geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r737739 - /geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
Date Mon, 26 Jan 2009 16:35:47 GMT
Author: gawor
Date: Mon Jan 26 16:35:47 2009
New Revision: 737739

URL: http://svn.apache.org/viewvc?rev=737739&view=rev
Log:
provide hashCode() and equals() implementations for RMI client socket factory

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java?rev=737739&r1=737738&r2=737739&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
Mon Jan 26 16:35:47 2009
@@ -46,5 +46,35 @@
         }
         return socket;
     }
-    
+
+    @Override
+    public int hashCode() {
+        int prime = 31;
+        int result = 1;
+        result = prime * result + connectionTimeout;
+        result = prime * result + readTimeout;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        GeronimoRMIClientSocketFactory other = (GeronimoRMIClientSocketFactory) obj;
+        if (connectionTimeout != other.connectionTimeout) {
+            return false;
+        }
+        if (readTimeout != other.readTimeout) {
+            return false;
+        }
+        return true;
+    }
+
 }



Mime
View raw message