commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1468858 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
Date Wed, 17 Apr 2013 12:08:25 GMT
Author: sebb
Date: Wed Apr 17 12:08:24 2013
New Revision: 1468858

URL: http://svn.apache.org/r1468858
Log:
Add some more fields to the test class

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java?rev=1468858&r1=1468857&r2=1468858&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
Wed Apr 17 12:08:24 2013
@@ -93,16 +93,27 @@ public class ClassLoaderObjectInputStrea
         clois.close();
     }
 
+    private static enum E{A, B, C}
+
     private static class Test implements Serializable {
         private static final long serialVersionUID = 1L;
         private int i;
 
+        private E e;
+
         Test(int i) {
             this.i = i;
+            this.e = E.A;
         }
         @Override
         public boolean equals(Object other) {
-            return other instanceof Test & (this.i == ((Test)other).i);
+            if (other instanceof Test) {
+                Test tother = (Test) other;
+                return (this.i == tother.i)
+                        & (this.e == tother.e);
+            } else {
+                return false;
+            }
         }
         @Override
         public int hashCode() {



Mime
View raw message