Commit a93a4e87 authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Use String.equalsIgnoreCase() where possible

Closes gh-11330
parent 315fb780
...@@ -130,7 +130,7 @@ public abstract class AbstractErrorWebExceptionHandler ...@@ -130,7 +130,7 @@ public abstract class AbstractErrorWebExceptionHandler
*/ */
protected boolean isTraceEnabled(ServerRequest request) { protected boolean isTraceEnabled(ServerRequest request) {
String parameter = request.queryParam("trace").orElse("false"); String parameter = request.queryParam("trace").orElse("false");
return !"false".equals(parameter.toLowerCase()); return !"false".equalsIgnoreCase(parameter);
} }
/** /**
......
...@@ -76,10 +76,7 @@ public abstract class AbstractErrorController implements ErrorController { ...@@ -76,10 +76,7 @@ public abstract class AbstractErrorController implements ErrorController {
protected boolean getTraceParameter(HttpServletRequest request) { protected boolean getTraceParameter(HttpServletRequest request) {
String parameter = request.getParameter("trace"); String parameter = request.getParameter("trace");
if (parameter == null) { return !"false".equalsIgnoreCase(parameter);
return false;
}
return !"false".equals(parameter.toLowerCase());
} }
protected HttpStatus getStatus(HttpServletRequest request) { protected HttpStatus getStatus(HttpServletRequest request) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment