Fixed NPE when user not belongs to any context
This commit is contained in:
parent
8989c927c0
commit
9d58dd475e
|
@ -86,8 +86,8 @@ public class UserSitesToGroupsAndRolesMapper {
|
||||||
Site gwSitesTree = null;
|
Site gwSitesTree = null;
|
||||||
try {
|
try {
|
||||||
gwSitesTree = mapper.map(rootVOGCubeGroup.getGroupName());
|
gwSitesTree = mapper.map(rootVOGCubeGroup.getGroupName());
|
||||||
if (log.isInfoEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.info("Sites tree is: " + gwSitesTree.dump());
|
log.debug("Sites tree is: " + (gwSitesTree != null ? gwSitesTree.dump() : "null"));
|
||||||
}
|
}
|
||||||
} catch (SitesMapperExecption e) {
|
} catch (SitesMapperExecption e) {
|
||||||
log.error("Computing sites tree in concrete mapper class", e);
|
log.error("Computing sites tree in concrete mapper class", e);
|
||||||
|
@ -101,7 +101,7 @@ public class UserSitesToGroupsAndRolesMapper {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Check user to sites removal");
|
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<>();
|
List<String> vreNames = new ArrayList<>();
|
||||||
if (gwSitesTree != null) {
|
if (gwSitesTree != null) {
|
||||||
log.debug("Collecting VREs user belongs to");
|
log.debug("Collecting VREs user belongs to");
|
||||||
|
|
Loading…
Reference in New Issue