[
https://issues.apache.org/jira/browse/OAK-9584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947632#comment-17947632
]
Konrad Windszus edited comment on OAK-9584 at 4/27/25 4:25 PM:
---------------------------------------------------------------
I would like to revisit the decision to close this and OAK-74 as "Not a
bug"/"Won't fix" in the context of OAK-11397. I do think that from a consumer
perspective this is a bug! I think tackling it the same as in JR2 (i.e. treat
{{internal}} enclosed in curly brackets an invalid local name and detect names
starting with it as expanded form using this built-in mapping) is actually the
preferred handling here. Right now this inconsistency with regards to "rep"
prefix leads to edge case issues which are hard to detect. At the same time I
would propose to make the namespace registration more strict (i.e. throw an
exception for every invalid URI given to registerNamespace(...) except for
"internal"). WDYT?
This would require a change in the
https://github.com/apache/jackrabbit-oak/blob/4b7c14a6dd4d36d546306503c397d0a1ee627f9e/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/GlobalNameMapper.java#L197
to also add a special case for "internal" (similar as to for the existing
special case for the empty namespace).
was (Author: kwin):
I would like to revisit the decision to close this and OAK-74 as "Not a
bug"/"Won't fix" in the context of OAK-11397. I do think that from a consumer
perspective this is a bug! I think tackling it the same as in JR2 (i.e. treat
{{internal}} enclosed in curly brackets an invalid local name and detect names
starting with it as expanded form using this built-in mapping) is actually the
preferred handling here. Right now this inconsistency with regards to "rep"
prefix leads to edge case issues which are hard to detect. At the same time I
would propose to make the namespace registration more strict (i.e. throw an
exception for every invalid URI given to registerNamespace(...) except for
"internal"). WDYT?
> Node.hasProperty("rep:authorizableId") only supports qualified names but not
> expanded names.
> --------------------------------------------------------------------------------------------
>
> Key: OAK-9584
> URL: https://issues.apache.org/jira/browse/OAK-9584
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: jcr
> Affects Versions: 1.40.0
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Priority: Major
>
> I have a JCR Node which returns
> {{true}} for
> {code}
> node.hasProperty("rep:authorizableId")
> {code} but
> {{false}} for
> {code}
> node.hasProperty("{internal}authorizableId")
> {code}
> According to
> https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2.6%20Use%20of%20Qualified%20and%20Expanded%20Names
> bq. When a JCR name is passed as an argument to a JCR method it may be in
> either expanded or qualified form.
> this is a violation of the spec.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)