jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-5260) Incorrect handling of subpaths with leading left curly bracket
Date Thu, 15 Dec 2016 10:02:58 GMT

    [ https://issues.apache.org/jira/browse/OAK-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15750965#comment-15750965

Thomas Mueller commented on OAK-5260:

JcrPathParser is a bit strange. There seems to be code that is impossible to reach, possibly
this is due to bugs. For example, there is a variable "wasSlash" that is set and tested, but
it is not possible to ever become true where it is tested for, because it is only true if
the _last_ character was a slash, in which case the state can never be STATE_PREFIX, or STATE_NAME.
I guess the assignment was meant to be "wasSlash |= c == '/'". Also, the validate method uses
a listener with the variable "hasRoot", which can never possibly be true where it is tested.
JcrNameParser looks a bit better, but I guess more tests should be added there as well. Need
to check the spec now.

> Incorrect handling of subpaths with leading left curly bracket
> --------------------------------------------------------------
>                 Key: OAK-5260
>                 URL: https://issues.apache.org/jira/browse/OAK-5260
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Bertrand Delacretaz
>            Assignee: Julian Sedding
>             Fix For: 1.6
>         Attachments: OAK-5260-jsedding.patch, OAK-5260.patch
> As per SLING-6383 it looks like the Oak name mapping causes for example getItem("/libs/{sub")
(with a left curly bracket in the path) to return the /libs node if that exists but the supplied
path does not.
> I'll attach a patch with a test that demonstrates this. 
> [~fmeschbe] mentions in that Sling issue that the parsing of the CR 2 section
Expanded Form could be involved, treating the left curly bracket in a special way that's not
appropriate here.

This message was sent by Atlassian JIRA

View raw message