jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-789) PathElement.equals doesn't handle INDEX_UNDEFINED
Date Fri, 30 Mar 2007 09:22:25 GMT

    [ https://issues.apache.org/jira/browse/JCR-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485449

Tobias Bocanegra commented on JCR-789:

> What's the benefit of using a 0-based index when the spec says they are 1-based? 
> Wouldn't that make the implementation more complicated to understand? 
first, computer science is 0-based :-)
i remember a lot of bugs that were caused because the code was not very clear about if the
index is 0 or 1 based and what happens if the index is 0 (eg. the node state throws an exception
if access with a index < 0).

however, "/a".equals("/a[1]") should return true (and compute the same hashcode).

> PathElement.equals doesn't handle INDEX_UNDEFINED
> -------------------------------------------------
>                 Key: JCR-789
>                 URL: https://issues.apache.org/jira/browse/JCR-789
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>            Reporter: Julian Reschke
>            Priority: Minor
>         Attachments: jcr789.diff.txt
> PathElement (and therefore Path) comparisons fail when INDEX_UNDEFINED is used (it's
treated differently from INDEX_DEFAULT).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message