chirino 2003/11/23 21:12:17
Modified: modules/remoting/src/test/org/apache/geronimo/remoting
JMXRemotingTestMain.java
Log:
Fix the test so that it works even with a filter. The filter has to
implement the equals and hashCode methods since it is being passed by value to
the remote server. The second time it is passed it will not == the original
but it should .equal() the original.
Revision Changes Path
1.5 +11 -0
incubator-geronimo/modules/remoting/src/test/org/apache/geronimo/remoting/JMXRemotingTestMain.java
Index: JMXRemotingTestMain.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/remoting/src/test/org/apache/geronimo/remoting/JMXRemotingTestMain.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JMXRemotingTestMain.java 23 Nov 2003 17:51:50 -0000 1.4
+++ JMXRemotingTestMain.java 24 Nov 2003 05:12:17 -0000 1.5
@@ -121,6 +121,17 @@
System.err.println("Filtering a notification:
"+notification.getType());
return true;
}
+
+ public int hashCode() {
+ return 1;
+ }
+ public boolean equals(Object obj) {
+ if( obj == null )
+ return false;
+ if( obj.getClass() != getClass() )
+ return false;
+ return true;
+ }
}
public void testNotificationListner() throws Exception {