Browse Source

Use String.equalsIgnoreCase() where possible

Closes gh-11330
pull/11327/merge
dreis2211 8 years ago committed by Stephane Nicoll
parent
commit
a93a4e8715
  1. 2
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java
  2. 5
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java

2
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java

@ -130,7 +130,7 @@ public abstract class AbstractErrorWebExceptionHandler @@ -130,7 +130,7 @@ public abstract class AbstractErrorWebExceptionHandler
*/
protected boolean isTraceEnabled(ServerRequest request) {
String parameter = request.queryParam("trace").orElse("false");
return !"false".equals(parameter.toLowerCase());
return !"false".equalsIgnoreCase(parameter);
}
/**

5
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java

@ -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) {
String parameter = request.getParameter("trace");
if (parameter == null) {
return false;
}
return !"false".equals(parameter.toLowerCase());
return !"false".equalsIgnoreCase(parameter);
}
protected HttpStatus getStatus(HttpServletRequest request) {

Loading…
Cancel
Save