Skip to content

Commit

Permalink
RANGER-3387: fix for PMD violation - #2
Browse files Browse the repository at this point in the history
  • Loading branch information
mneethiraj committed Jul 25, 2022
1 parent ee2dc9b commit e17ffa3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
if (IS_CSRF_ENABLED) {
final HttpServletRequest httpRequest = (HttpServletRequest)request;
final HttpServletResponse httpResponse = (HttpServletResponse)response;
Boolean spnegoEnabled = httpRequest.getAttribute("spnegoEnabled") != null ? Boolean.valueOf(String.valueOf(httpRequest.getAttribute("spnegoEnabled"))) : false;
Boolean trustedProxyEnabled = httpRequest.getAttribute("trustedProxyEnabled") != null ? Boolean.valueOf(String.valueOf(httpRequest.getAttribute("trustedProxyEnabled"))) : false;
Boolean spnegoEnabled = httpRequest.getAttribute("spnegoEnabled") != null && Boolean.valueOf(String.valueOf(httpRequest.getAttribute("spnegoEnabled")));
Boolean trustedProxyEnabled = httpRequest.getAttribute("trustedProxyEnabled") != null && Boolean.valueOf(String.valueOf(httpRequest.getAttribute("trustedProxyEnabled")));
handleHttpInteraction(new ServletFilterHttpInteraction(httpRequest, httpResponse, chain), spnegoEnabled, trustedProxyEnabled);
}else{
chain.doFilter(request, response);
Expand Down

0 comments on commit e17ffa3

Please sign in to comment.