[Mulgara-dev] [Mulgara-svn] r1423 - trunk/src/jar/query/java/org/jrdf/graph

Life is hard, and then you die ronald at innovation.ch
Wed Dec 17 10:09:00 UTC 2008


On Tue, Dec 16, 2008 at 12:11:03PM -0800, pag at mulgara.org wrote:
> Author: pag
> Date: 2008-12-16 12:11:02 -0800 (Tue, 16 Dec 2008)
> New Revision: 1423
> 
> Modified:
>    trunk/src/jar/query/java/org/jrdf/graph/AbstractURIReference.java
> Log:
> Changed hashCode to the hash of the string and not the URI
> 
> Modified: trunk/src/jar/query/java/org/jrdf/graph/AbstractURIReference.java
> ===================================================================
> --- trunk/src/jar/query/java/org/jrdf/graph/AbstractURIReference.java	2008-12-16 09:13:51 UTC (rev 1422)
> +++ trunk/src/jar/query/java/org/jrdf/graph/AbstractURIReference.java	2008-12-16 20:11:02 UTC (rev 1423)
> @@ -194,6 +194,6 @@
>     * @return A hash code for the URI.
>     */
>    public int hashCode() {
> -    return uri.hashCode();
> +    return toString().hashCode();

Hmm, both this and the equals() implementation look wrong - why don't
these both just delete to URI? E.g. why are URIReferences for 
'http://FOOBAR/' and 'http://foobar/' different when the URI's are the
same?


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list