[
https://issues.apache.org/jira/browse/OAK-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting updated OAK-108:
------------------------------
Attachment: 0001-OAK-108-Shortcut-path-conversions.patch
bq. We need to parse anyway in order to detect invalid paths.
As discussed on oak-dev@, I'd argue that we actually *don't* need to detect
invalid paths in the mapping phase. Instead, when writing content to the
repository, the {{NameValidator}} will enforce validity of all names and thus
also paths. And since we can rely on all existing repository paths to be valid,
there's no need for syntactic checks on paths that match existing content.
Validity checks on non-matching paths could still be added where needed, though
I don't see many places where that would be the case (see also my argument for
{{PathNotFoundException}} in OAK-563).
The attached patch removes the validation step from the main code path in
{{NamePathMapperImpl.getOakPath()}} and adds extra validation to relevant
places in {{ValueFactoryImpl}} (where the TCK indirectly expects it to happen).
Also the handling of names in the query code needs to be slightly updated.
> Shortcut path conversions
> -------------------------
>
> Key: OAK-108
> URL: https://issues.apache.org/jira/browse/OAK-108
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: jcr
> Reporter: Julian Reschke
> Fix For: 0.7
>
> Attachments: 0001-OAK-108-Shortcut-path-conversions.patch
>
>
> It would be nice if we could shortcut path conversions in order to minimize
> the cost of converting between OAK paths and JCR paths.
> For instance, when going from OAK to JCR (assuming that the path is valid and
> normalized to begin with), we should be able to avoid prefix remapping
> completely if there are no session prefix remappings. To detect the latter,
> we'll however have to override or extend the namespace handling inside
> jcr-commons abstract-session.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira