From c1b9d3c2260d3c5bae733067da4f4d5ac1783e5f Mon Sep 17 00:00:00 2001 From: May Date: Wed, 24 Jun 2020 15:03:14 +0800 Subject: [PATCH] Simplify logic in ErrorPage's equals method See gh-22082 --- .../java/org/springframework/boot/web/server/ErrorPage.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 b49cee29d5..10d10a86d3 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,8 +114,7 @@ public class ErrorPage { } if (obj instanceof ErrorPage) { ErrorPage other = (ErrorPage) obj; - boolean rtn = true; - rtn = rtn && ObjectUtils.nullSafeEquals(getExceptionName(), other.getExceptionName()); + boolean rtn = ObjectUtils.nullSafeEquals(getExceptionName(), other.getExceptionName()); rtn = rtn && ObjectUtils.nullSafeEquals(this.path, other.path); rtn = rtn && this.status == other.status; return rtn;