diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-06 11:15:02 +0200 |
---|---|---|
committer | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-06 11:15:02 +0200 |
commit | 824d93f9d0ada807402b66153cc41b30b31fde3a (patch) | |
tree | 498e44d583fa102a5174632cd45a62e5fcaa60f7 /ecomp-sdk/epsdk-app-os/src/main/java/org/onap | |
parent | 8b1abe6b2267047d26e0e6cee1c8c086dae95663 (diff) |
Fix sonar issues in SecurityXssFilter
Change-Id: Ibb4bbb1197aed3208835a82b4dbabe2cbd2eb93a
Issue-ID: PORTAL-523
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-os/src/main/java/org/onap')
-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 |