summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java3
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java5
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);
}