diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-06 11:15:02 +0200 |
---|---|---|
committer | Manoop Talasila <talasila@research.att.com> | 2019-08-13 18:23:22 +0000 |
commit | ba467e6b7023ba2cb12347cc49ca1162d4e9019d (patch) | |
tree | 498e44d583fa102a5174632cd45a62e5fcaa60f7 | |
parent | bbfb6e32d122122eadb2a75e9425fcc1c587f180 (diff) |
Fix sonar issues in SecurityXssFilter
Change-Id: Ibb4bbb1197aed3208835a82b4dbabe2cbd2eb93a
Issue-ID: PORTAL-523
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
(cherry picked from commit 824d93f9d0ada807402b66153cc41b30b31fde3a)
-rw-r--r-- | ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java index 4bc8b436..91025d14 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java @@ -170,7 +170,8 @@ public class SecurityXssFilter extends OncePerRequestFilter { } private boolean validateRequestType(HttpServletRequest request) { - return (request.getMethod().equalsIgnoreCase("POST") || request.getMethod().equalsIgnoreCase("PUT") - || request.getMethod().equalsIgnoreCase("DELETE")); + return ("POST".equalsIgnoreCase(request.getMethod() ) || + "PUT".equalsIgnoreCase( request.getMethod() ) || + "DELETE".equalsIgnoreCase( request.getMethod() ) ); } }
\ No newline at end of file |