From 4ab4c6176147ad23a8cb16b9793dc521d6791a1a Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 7 Jul 2020 09:28:07 +0900 Subject: [PATCH] Polish ErrorPage.equals() See gh-22240 --- .../java/org/springframework/boot/web/server/ErrorPage.java | 6 ++---- 1 file changed, 2 insertions(+), 4 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 00ed358622..016bdc319c 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; }