Skip to content

Commit 91d10cc

Browse files
committed
Add some more fields to the test class
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1468858 13f79535-47bb-0310-9956-ffa450edef68
1 parent 62a47bf commit 91d10cc

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,27 @@ public void testPrimitiveLong() throws Exception {
9393
clois.close();
9494
}
9595

96+
private static enum E{A, B, C}
97+
9698
private static class Test implements Serializable {
9799
private static final long serialVersionUID = 1L;
98100
private int i;
99101

102+
private E e;
103+
100104
Test(int i) {
101105
this.i = i;
106+
this.e = E.A;
102107
}
103108
@Override
104109
public boolean equals(Object other) {
105-
return other instanceof Test & (this.i == ((Test)other).i);
110+
if (other instanceof Test) {
111+
Test tother = (Test) other;
112+
return (this.i == tother.i)
113+
& (this.e == tother.e);
114+
} else {
115+
return false;
116+
}
106117
}
107118
@Override
108119
public int hashCode() {

0 commit comments

Comments
 (0)