diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java index 00ed358622a..016bdc319c9 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java @@ -114,10 +114,8 @@ public class ErrorPage { } if (obj instanceof ErrorPage) { ErrorPage other = (ErrorPage) obj; - boolean rtn = ObjectUtils.nullSafeEquals(getExceptionName(), other.getExceptionName()); - rtn = rtn && ObjectUtils.nullSafeEquals(this.path, other.path); - rtn = rtn && this.status == other.status; - return rtn; + return ObjectUtils.nullSafeEquals(getExceptionName(), other.getExceptionName()) + && ObjectUtils.nullSafeEquals(this.path, other.path) && this.status == other.status; } return false; }