From 824d93f9d0ada807402b66153cc41b30b31fde3a Mon Sep 17 00:00:00 2001 From: burdziak Date: Tue, 6 Aug 2019 11:15:02 +0200 Subject: Fix sonar issues in SecurityXssFilter Change-Id: Ibb4bbb1197aed3208835a82b4dbabe2cbd2eb93a Issue-ID: PORTAL-523 Signed-off-by: burdziak --- .../src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ecomp-sdk') 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 -- cgit 1.2.3-korg