diff options
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java index e509fcf5..3efe4382 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java @@ -145,7 +145,7 @@ public class EPRoleServiceImpl implements EPRoleService { } else if (appId != 1 && !roleName.equals(PortalConstants.ADMIN_ROLE)) { roles = (List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", params, null); } - int resultsCount = roles.size(); + int resultsCount = (roles == null ? 0 : roles.size()); if (resultsCount > 1) { logger.error(EELFLoggerDelegate.errorLogger, "Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar."); |