You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2025/02/14 18:43:00 UTC

[jira] [Commented] (OAK-11486) Session-local namespace mappings for unregistered namespace URIs lead to unexpected ISE for Node.getName()

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

Konrad Windszus commented on OAK-11486:
---------------------------------------

Can you have a look at the failing test case in https://github.com/apache/jackrabbit-oak/pull/2081/files? I think the logic in https://github.com/apache/jackrabbit-oak/blob/2f32f64a1c0d266c2918e64a2d631d2dddfc9da6/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/LocalNameMapper.java#L65-L94 is having the wrong order. It must first check any local mapping before as last resort fall back to the namespace registry. WDYT?

> Session-local namespace mappings for unregistered namespace URIs lead to unexpected ISE for Node.getName() 
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-11486
>                 URL: https://issues.apache.org/jira/browse/OAK-11486
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>    Affects Versions: 1.76.0
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When creating a node with an unknown prefix and afterwards mapping that prefix to an unregistered URI with {{Session.setNamespacePrefix(...)}} (https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Session.html#setNamespacePrefix(java.lang.String,%20java.lang.String)) calling its {{Node.getName()}} methods leads to an unexpected ISE (which is declared in https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Item.html#getName()).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)