From f37b25b04cb3a3c34b3ec476745fc8844b01579d Mon Sep 17 00:00:00 2001 From: Sumapriya Sarvepalli Date: Mon, 13 Aug 2018 16:01:34 +0530 Subject: Sonar major issues Replace the type specification in this constructor call with the diamond operator Sonar Link: https://sonar.onap.org/code?id=org.onap.portal.sdk%3Aepsdk-project&selected=org.onap.portal.sdk%3Aepsdk-app-common%3Asrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fservice%2FOnBoardingApiServiceImpl.java Location: epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java Line No: L282 L302 L326 L360 Change-Id: Ice2ab43f0a9db648d2a5b40fc21eebbd536f37e9 Issue-ID: PORTAL-353 Signed-off-by: Sumapriya Sarvepalli --- .../java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ecomp-sdk/epsdk-app-common/src/main') diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java index 871a3750..966eb8f2 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java @@ -279,7 +279,7 @@ public class OnBoardingApiServiceImpl implements IPortalRestAPIService, IPortalR } else { List users = userProfileService.findAllActive(); - List ecompUsers = new ArrayList(); + List ecompUsers = new ArrayList<>(); for (User user : users) ecompUsers.add(UserUtils.convertToEcompUser(user)); return ecompUsers; @@ -299,7 +299,7 @@ public class OnBoardingApiServiceImpl implements IPortalRestAPIService, IPortalR public List getAvailableRoles(String requestedLoginId) throws PortalAPIException { try { List roles = roleService.getActiveRoles(requestedLoginId); - List ecompRoles = new ArrayList(); + List ecompRoles = new ArrayList<>(); for (Role role : roles) ecompRoles.add(UserUtils.convertToEcompRole(role)); return ecompRoles; @@ -323,7 +323,7 @@ public class OnBoardingApiServiceImpl implements IPortalRestAPIService, IPortalR * TypeFactory.defaultInstance().constructCollectionType(List.class, * EcompRole.class)); */ - SortedSet roles = new TreeSet(); + SortedSet roles = new TreeSet<>(); for (EcompRole role : rolesJson) { roles.add(roleService.getRole(loginId,role.getId())); } @@ -357,7 +357,7 @@ public class OnBoardingApiServiceImpl implements IPortalRestAPIService, IPortalR public List getUserRoles(String loginId) throws PortalAPIException { if (logger.isDebugEnabled()) logger.debug(EELFLoggerDelegate.debugLogger, "## REST API ## loginId: {}", loginId); - List ecompRoles = new ArrayList(); + List ecompRoles = new ArrayList<>(); try { if (isCentralized.equals(isAccessCentralized)) { -- cgit 1.2.3-korg