Skip to content

Commit ce1f6cf

Browse files
committed
Polishing
1 parent c702cd4 commit ce1f6cf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spring-web/src/main/java/org/springframework/http/DefaultHttpStatusCode.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,12 @@ public int hashCode() {
9090

9191
@Override
9292
public boolean equals(Object obj) {
93-
if (obj instanceof HttpStatusCode other) {
94-
return this.value == other.value();
95-
}
96-
else {
97-
return false;
98-
}
93+
return (obj instanceof HttpStatusCode other && this.value == other.value());
9994
}
10095

10196
@Override
10297
public String toString() {
10398
return Integer.toString(this.value);
10499
}
100+
105101
}

0 commit comments

Comments
 (0)