[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Added missing methods in org.ietf interface declaratio
From: |
Meskauskas Audrius |
Subject: |
[cp-patches] FYI: Added missing methods in org.ietf interface declarations. |
Date: |
Thu, 20 Oct 2005 10:39:22 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
This patch adds the declaration of the hashCode method to these two
interfaces. The method is inherited from Object, and explicit
declaration just indicates that it must be overridden because the
.equals must be overridden.
2005-10-20 Audrius Meskauskas <address@hidden>
* org/ietf/jgss/GSSCredential.java (hashCode),
org/ietf/jgss/GSSName.java (hashCode): New declarations.
Index: org/ietf/jgss/GSSCredential.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/ietf/jgss/GSSCredential.java,v
retrieving revision 1.3
diff -u -r1.3 GSSCredential.java
--- org/ietf/jgss/GSSCredential.java 2 Jul 2005 20:32:55 -0000 1.3
+++ org/ietf/jgss/GSSCredential.java 20 Oct 2005 08:36:52 -0000
@@ -331,4 +331,14 @@
* @return True if this object equals the other.
*/
boolean equals(Object another);
+
+ /**
+ * Return the hash code of this credential. When overriding address@hidden
#equals},
+ * it is necessary to override hashCode() as well.
+ *
+ * @return the hash code that must be the same for two credentials if
+ * address@hidden #equals} returns true.
+ */
+ int hashCode();
+
}
Index: org/ietf/jgss/GSSName.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/ietf/jgss/GSSName.java,v
retrieving revision 1.3
diff -u -r1.3 GSSName.java
--- org/ietf/jgss/GSSName.java 2 Jul 2005 20:32:55 -0000 1.3
+++ org/ietf/jgss/GSSName.java 20 Oct 2005 08:36:52 -0000
@@ -201,6 +201,15 @@
boolean equals(Object another);
/**
+ * Return the hashcode of this GSSName. When overriding address@hidden
#equals},
+ * it is normally necessary to override hashCode() as well.
+ *
+ * @return the hash code that must be the same for two names if
address@hidden #equals}
+ * returns true.
+ */
+ int hashCode();
+
+ /**
* Creates a mechanism name (MN) from an arbitrary internal name. This
* is equivalent to using the factory methods address@hidden
*
GSSManager#createName(java.lang.String,org.ietf.jgss.Oid,org.ietf.jgss.Oid)}
- [cp-patches] FYI: Added missing methods in org.ietf interface declarations.,
Meskauskas Audrius <=