[jboss-remoting-commits] JBoss Remoting SVN: r5766 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Feb 27 18:26:08 EST 2010


Author: david.lloyd at jboss.com
Date: 2010-02-27 18:26:07 -0500 (Sat, 27 Feb 2010)
New Revision: 5766

Modified:
   remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java
Log:
Implement equals/hashCode on test object so equals assertions work across remote connections

Modified: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java	2010-02-27 23:20:58 UTC (rev 5765)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/InvocationTestObject.java	2010-02-27 23:26:07 UTC (rev 5766)
@@ -26,4 +26,22 @@
 
 public final class InvocationTestObject implements Serializable {
     private static final long serialVersionUID = 7228470862155215008L;
+
+    private final int frob = 12345;
+
+    public int getFrob() {
+        return frob;
+    }
+
+    public boolean equals(final Object obj) {
+        return obj instanceof InvocationTestObject && equals((InvocationTestObject) obj);
+    }
+
+    public boolean equals(final InvocationTestObject obj) {
+        return obj != null && obj.frob == frob;
+    }
+
+    public int hashCode() {
+        return frob;
+    }
 }



More information about the jboss-remoting-commits mailing list