We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b466184 commit 88cd8f9Copy full SHA for 88cd8f9
simple-math/src/main/java/com/craftsmanshipinsoftware/math/console/PositiveInteger.java
@@ -52,13 +52,7 @@ public int hashCode() {
52
53
@Override
54
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);
+ return this == obj || (obj instanceof PositiveInteger that && this.value.equals(that.value));
62
}
63
64
0 commit comments