X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fportalapp%2Fportal%2Fservice%2FEPRoleServiceImpl.java;h=3efe4382bc5784c08d0eca2d593c89488b395f55;hb=23634dba70b166ad3c79b5eadfbd32b5375d44be;hp=e509fcf559430378cfd6ad858a487046a9697a39;hpb=4ba6a0f20a190030700917a6065a6779ca9d308f;p=portal.git 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) 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.");