kwin commented on code in PR #2229: URL: https://github.com/apache/jackrabbit-oak/pull/2229#discussion_r2062642735
########## oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/JackrabbitSessionTest.java: ########## @@ -86,20 +88,39 @@ public void testGetExpandedName() throws RepositoryException { 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 + // now remap namespace uri - should not affect expanded name + assertEquals("prefix 'test' has unexpected mapping", + "http://www.apache.org/jackrabbit/test", s.getNamespaceURI("test")); s.setNamespacePrefix("test", "urn:foo"); - assertEquals("{urn:foo}bar", s.getExpandedName(n)); + assertEquals("{http://www.apache.org/jackrabbit/test}bar", s.getExpandedName(n)); // use special namespace uri n = testRootNode.addNode("rep:bar"); assertEquals("{internal}bar", s.getExpandedName(n)); } + public void testGetExpandedNameBrokenNamespace() throws RepositoryException { + // empty namespace uri + assertEquals("{}testroot", s.getExpandedName(testRootNode)); + + // register broken namespace name + s.getWorkspace().getNamespaceRegistry().registerNamespace("foo", "bar"); Review Comment: it actually does fail! Compare with https://github.com/apache/jackrabbit-oak/pull/2229#pullrequestreview-2797655309 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org