From 396cb378ab8940b1adb8ba1adc656d0b4ad66f99 Mon Sep 17 00:00:00 2001 From: Divesh Mirchandani Date: Thu, 14 Sep 2017 19:14:21 +0530 Subject: Fixed SONAR issues Fixed blocker, critical, major & minor SONAR issues. Issue-ID: SDC-343 Change-Id: I72e5a3a7fa7d7407a92f98f77e4334827f70f926 Signed-off-by: dd4616 --- .../org/openecomp/server/filters/ActionAuthenticationFilter.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java index e59d3fb3b8..18465cd00c 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java @@ -20,6 +20,9 @@ package org.openecomp.server.filters; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; + import java.io.IOException; import java.security.Principal; import java.util.Base64; @@ -35,6 +38,7 @@ import javax.servlet.http.HttpServletResponse; public class ActionAuthenticationFilter implements Filter { + private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); private boolean runningOnLocal = true; @Override @@ -58,6 +62,7 @@ public class ActionAuthenticationFilter implements Filter { String decodedCredentials = new String(Base64.getDecoder().decode(base64Credentials)); username = decodedCredentials.substring(0, decodedCredentials.indexOf(":")); } catch (Exception exception) { + log.debug("",exception); setResponseStatus((HttpServletResponse) arg1, HttpServletResponse.SC_FORBIDDEN); return; } @@ -82,6 +87,7 @@ public class ActionAuthenticationFilter implements Filter { .valueOf(username.substring(username.indexOf("-") + 1).toUpperCase()); return userPrivilege.ordinal() >= requiredPrivilege.ordinal(); } catch (Exception exception) { + log.debug("",exception); return false; } } -- cgit 1.2.3-korg