Fixed NPE when user not belongs to any context

This commit is contained in:
Mauro Mugnaini 2020-05-29 15:47:51 +02:00
parent 8989c927c0
commit 9d58dd475e
1 changed files with 4 additions and 4 deletions

View File

@ -86,8 +86,8 @@ public class UserSitesToGroupsAndRolesMapper {
Site gwSitesTree = null;
try {
gwSitesTree = mapper.map(rootVOGCubeGroup.getGroupName());
if (log.isInfoEnabled()) {
log.info("Sites tree is: " + gwSitesTree.dump());
if (log.isDebugEnabled()) {
log.debug("Sites tree is: " + (gwSitesTree != null ? gwSitesTree.dump() : "null"));
}
} catch (SitesMapperExecption e) {
log.error("Computing sites tree in concrete mapper class", e);
@ -101,7 +101,7 @@ public class UserSitesToGroupsAndRolesMapper {
if (log.isDebugEnabled()) {
log.debug("Check user to sites removal");
}
checkForVRERemoval(gwSitesTree);
checkForSiteRemoval(gwSitesTree);
}
@ -205,7 +205,7 @@ public class UserSitesToGroupsAndRolesMapper {
}
}
protected void checkForVRERemoval(Site gwSitesTree) {
protected void checkForSiteRemoval(Site gwSitesTree) {
List<String> vreNames = new ArrayList<>();
if (gwSitesTree != null) {
log.debug("Collecting VREs user belongs to");