diff options
author | Manoop Talasila <talasila@research.att.com> | 2019-08-13 18:25:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-13 18:25:59 +0000 |
commit | 1a415316bf629c826dd712c1d6a13b70801f2a00 (patch) | |
tree | 7d2b56ca19fc28f72e5572db6e648b870e048eb6 /ecomp-sdk | |
parent | 467622a15cc3dd8d4b529e70e7870eeb7bb01cbd (diff) | |
parent | fe2fd7021b7cb8a7c2767c1df2e3586b5041018f (diff) |
Merge "Sonar fix in epsdk-core"
Diffstat (limited to 'ecomp-sdk')
2 files changed, 5 insertions, 3 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java index 581edee8..ee7a7d7d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java @@ -62,7 +62,7 @@ public class Helper { String url = PortalApiProperties.getProperty(PortalApiConstants.UEB_URL_LIST); if (url == null) { logger.error("uebUrlList: failed to get property " + PortalApiConstants.UEB_URL_LIST); - return new LinkedList<String>(); + return new LinkedList<>(); } LinkedList<String> urlList = new LinkedList<>(); for (String u : url.split(",")) { @@ -76,6 +76,7 @@ public class Helper { Thread.sleep(milliseconds); } catch (InterruptedException e) { logger.warn("sleep was interrupted", e); + Thread.currentThread().interrupt(); } } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java index c31ef75e..d0450966 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java @@ -126,8 +126,9 @@ public class LoginExternalAuthServiceImpl implements LoginExternalAuthService { if (appuser == null && userHasRoleFunctions(user)) { createUserIfNecessary(user); } else { - appuser.setLastLoginDate(new Date()); - + if (appuser != null) { + appuser.setLastLoginDate(new Date()); + } // update the last logged in date for the user dataAccessService.saveDomainObject(appuser, additionalParams); } |