harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r822177 - in /harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse: CipherSuite.java ProtocolVersion.java
Date Tue, 06 Oct 2009 09:41:23 GMT
Author: tellison
Date: Tue Oct  6 09:41:22 2009
New Revision: 822177

URL: http://svn.apache.org/viewvc?rev=822177&view=rev
Log:
Define hashCode to compliment the equals method.

Modified:
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java?rev=822177&r1=822176&r2=822177&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
Tue Oct  6 09:41:22 2009
@@ -557,6 +557,14 @@
         }
         return false;
     }
+    
+    /**
+     * Returns the hash for this instance.
+     */
+    @Override
+    public int hashCode() {
+        return cipherSuiteCode[0] + cipherSuiteCode[1];
+    }
 
     /**
      * Returns cipher algorithm name

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java?rev=822177&r1=822176&r2=822177&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
Tue Oct  6 09:41:22 2009
@@ -155,4 +155,12 @@
         }
         return false;
     }
+    
+    /**
+     * Returns the hash of the receiver.
+     */
+    @Override
+    public int hashCode() {
+        return version[0] + version[1];
+    }
 }
\ No newline at end of file



Mime
View raw message