[
https://issues.apache.org/jira/browse/SLING-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Sedding updated SLING-4238:
----------------------------------
Description:
While using some third-party utility code, I discovered that JCR Mocks do not
quite adhere to the JCR spec:
{quote}
3.4.6 Passing Paths
When a JCR path is passed as an argument to a JCR method it may be normalized
or non-normalized and in standard or non-standard form.
{quote}
The problem shows up, e.g. when a path with a trailing slash is passed into a
method expecting an absolute path. E.g. {{session.nodeExists("/foo/")}} will
return false, even if the node {{/foo}} exists.
Overall, access to the internal data structure should always be with normalized
paths.
was:
While using some third-party utility code, I discovered that JCR Mocks do not
quite adhere to the JCR spec:
{quote}
3.4.6 Passing Paths
When a JCR path is passed as an argument to a JCR method it may be normalized
or non-normalized and in standard or non-standard form.
{quote}
The problem shows up, e.g. when a path with a trailing slash is passed into a
method expecting an absolute path. E.g. {{session.nodeExists("/foo/)}} will
return false, even if the node {{/foo}} exists.
Overall, access to the internal data structure should always be with normalized
paths.
> Jcr Mock does not normalize paths
> ---------------------------------
>
> Key: SLING-4238
> URL: https://issues.apache.org/jira/browse/SLING-4238
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing JCR Mock 1.1.0
> Reporter: Julian Sedding
> Assignee: Julian Sedding
> Labels: mocks
>
> While using some third-party utility code, I discovered that JCR Mocks do not
> quite adhere to the JCR spec:
> {quote}
> 3.4.6 Passing Paths
> When a JCR path is passed as an argument to a JCR method it may be normalized
> or non-normalized and in standard or non-standard form.
> {quote}
> The problem shows up, e.g. when a path with a trailing slash is passed into a
> method expecting an absolute path. E.g. {{session.nodeExists("/foo/")}} will
> return false, even if the node {{/foo}} exists.
> Overall, access to the internal data structure should always be with
> normalized paths.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)