Skip to content

Commit 63f9b48

Browse files
committed
Add Checkstyle EqualsHashCode
1 parent a6f63a4 commit 63f9b48

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/conf/checkstyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ limitations under the License.
4141
<module name="EmptyBlock">
4242
<property name="option" value="text" />
4343
</module>
44+
<module name="EqualsHashCode" />
4445
<module name="FinalLocalVariable" />
4546
<module name="ImportOrder">
4647
<property name="option" value="top"/>

src/test/java/org/apache/commons/io/function/IOPredicateTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public class IOPredicateTest {
5050
public boolean equals(final Object obj) {
5151
throw Erase.rethrow(new IOException("Expected"));
5252
}
53+
@Override
54+
public int hashCode() {
55+
// Pair implementation with equals() even though not strictly necessary.
56+
return super.hashCode();
57+
}
5358
};
5459

5560
private static final Predicate<Object> THROWING_UNCHECKED_PREDICATE = TestConstants.THROWING_IO_PREDICATE.asPredicate();

0 commit comments

Comments
 (0)