summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src
diff options
context:
space:
mode:
authorGujja <kg811t@research.att.com>2018-03-01 15:57:55 -0500
committerGujja <kg811t@research.att.com>2018-03-01 15:57:55 -0500
commitfadf84a4a76f7501e7dad2f426cdf4603304baad (patch)
tree237f8af2376ab83cfc282e37ac83390cf5ef4ce8 /ecomp-portal-BE-os/src
parent2445bfc7b28e0156014f03e75c7d3f55628cc0e7 (diff)
Added Junits
Issue-ID: PORTAL-155 Includes JUNITS, security issues fix Change-Id: I7c4032808163c46bf53477195823c7ed9dc99edc Signed-off-by:GUJJA <kg811t@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src')
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
index 88f7651c..0ee11715 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
@@ -200,7 +200,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
Map<Object, Object> model = new HashMap<Object, Object>();
HashMap<Object, Object> additionalParamsMap = new HashMap<Object, Object>();
EPLoginBean commandBean = new EPLoginBean();
- MDC.put(MDC_KEY_REQUEST_ID, getRequestId(request));
+ MDC.put(MDC_KEY_REQUEST_ID, (getRequestId(request)==null || getRequestId(request).isEmpty()) ? UUID.randomUUID().toString():getRequestId(request));
// get userId from cookie
String orgUserId = SessionCookieUtil.getUserIdFromCookie(request, response);
logger.info(EELFLoggerDelegate.debugLogger, "processSingleSignOn: begins with orgUserId {}", orgUserId);
@@ -230,11 +230,11 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
additionalParamsMap);
stopWatch.stop();
- MDC.put(EPSystemProperties.MDC_TIMER, stopWatch.getTotalTimeMillis() + "ms");
+ MDC.put(EPSystemProperties.MDC_TIMER, String.valueOf(stopWatch.getTotalTimeMillis()));
logger.info(EELFLoggerDelegate.debugLogger, "Operation findUser is completed.");
} catch (Exception e) {
stopWatch.stop();
- MDC.put(EPSystemProperties.MDC_TIMER, stopWatch.getTotalTimeMillis() + "ms");
+ MDC.put(EPSystemProperties.MDC_TIMER, String.valueOf(stopWatch.getTotalTimeMillis()));
logger.info(EELFLoggerDelegate.errorLogger, "processSingleSignOn failed on user " + orgUserId, e);
} finally {
MDC.remove(EPSystemProperties.MDC_TIMER);