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

Konrad Windszus commented on OAK-11637:
---------------------------------------

Isn't this a duplicate of OAK-11657 [~reschke]?

> JackrabbitSession.getExpandedName fails to handle session remappings properly
> -----------------------------------------------------------------------------
>
>                 Key: OAK-11637
>                 URL: https://issues.apache.org/jira/browse/OAK-11637
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Julian Reschke
>            Priority: Minor
>
> In 
> https://github.com/apache/jackrabbit-oak/blob/64ee526b80212de6c2d3d1082db6d71f804399c8/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/JackrabbitSessionTest.java#L84
> {code:java}
>     public void testGetExpandedName() throws RepositoryException {
>         // empty namespace uri
>         assertEquals("{}testroot", s.getExpandedName(testRootNode));
>         Node n = testRootNode.addNode("test:bar");
>         assertEquals("{http://www.apache.org/jackrabbit/test}bar";, 
> s.getExpandedName(n));
>         // now remap namespace uri
>         s.setNamespacePrefix("test", "urn:foo");
>         assertEquals("{urn:foo}bar", s.getExpandedName(n));
>         // use special namespace uri
>         n = testRootNode.addNode("rep:bar");
>         assertEquals("{internal}bar", s.getExpandedName(n));
>     }
> {code}
> ...the code assumes that remapping the prefix "test" to "urn:foo" will 
> actually change the item name's namespace. That is not correct and conflicts 
> with the purpose of expanded names.
> See related: https://issues.apache.org/jira/browse/JCR-5137



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

Reply via email to