fix for incident #7553

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@144984 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-03-16 17:14:23 +00:00
parent 44589386fe
commit 9205d0c4df
2 changed files with 19 additions and 14 deletions

View File

@ -5,6 +5,9 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="share-updates"/>
</wb-module>

View File

@ -464,15 +464,17 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
Set<String> toReturn = new HashSet<String>();
RoleManager rManager = new LiferayRoleManager();
for (ItemBean itemBean : mentionedUsers) {
if (mentionedUsers != null && !mentionedUsers.isEmpty()) {
for (ItemBean itemBean : mentionedUsers) {
if(itemBean.isItemGroup())
try {
toReturn.add(rManager.getTeam(Long.parseLong(itemBean.getId())).getTeamName());
} catch (NumberFormatException | UserManagementSystemException
| TeamRetrievalFault e) {
_log.warn("Unable to add this team", e);
}
if(itemBean.isItemGroup())
try {
toReturn.add(rManager.getTeam(Long.parseLong(itemBean.getId())).getTeamName());
} catch (NumberFormatException | UserManagementSystemException
| TeamRetrievalFault e) {
_log.warn("Unable to add this team", e);
}
}
}
return toReturn;