Skip to content

Commit 88cd8f9

Browse files
committed
Fix SimplifyBooleanReturns
1 parent b466184 commit 88cd8f9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

simple-math/src/main/java/com/craftsmanshipinsoftware/math/console/PositiveInteger.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ public int hashCode() {
5252

5353
@Override
5454
public boolean equals(Object obj) {
55-
if (this == obj) {
56-
return true;
57-
}
58-
if (!(obj instanceof PositiveInteger that)) {
59-
return false;
60-
}
61-
return this.value.equals(that.value);
55+
return this == obj || (obj instanceof PositiveInteger that && this.value.equals(that.value));
6256
}
6357

6458
@Override

0 commit comments

Comments
 (0)