mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Use String.equalsIgnoreCase() where possible
Closes gh-11330
This commit is contained in:
parent
315fb7809f
commit
a93a4e8715
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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…
Reference in New Issue
Block a user