[
https://issues.apache.org/jira/browse/JCR-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485435
]
Tobias Bocanegra commented on JCR-789:
--------------------------------------
i'm in favor of normalizing the index and also make it 0-based throughout the
code. there are several places where confusion exists about if the index is 0-
or 1-based, with statements like this: if (index == 0) { index = 1}
suggest to:
- use a 0-based index (when storing as int) throughout the code (also in
NodeState)
- drop INDEX_UNDEFINED in PathElement
- during serialization, index == 0 will not be translated into ...[1].
> 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.