You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2003/05/04 16:00:13 UTC

cvs commit: xml-axis/java/src/org/apache/axis/types URI.java

dims        2003/05/04 07:00:13

  Modified:    java/src/org/apache/axis/types URI.java
  Log:
  Fix for Bug 18938 - URI does not over-ride hashcode()
  
  Revision  Changes    Path
  1.2       +11 -0     xml-axis/java/src/org/apache/axis/types/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/types/URI.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- URI.java	22 Aug 2002 22:00:43 -0000	1.1
  +++ URI.java	4 May 2003 14:00:13 -0000	1.2
  @@ -1410,4 +1410,15 @@
       }
       return true;
     }
  +    
  +    /**
  +     * Returns a hash-code value for this URI.  The hash code is based upon all
  +     * of the URI's components, and satisfies the general contract of the
  +     * {@link java.lang.Object#hashCode() Object.hashCode} method. </p>
  +     *
  +     * @return  A hash-code value for this URI
  +     */
  +    public int hashCode() {
  +        return toString().toLowerCase().hashCode();        
  +    }
   }