kwin commented on code in PR #2079:
URL: https://github.com/apache/jackrabbit-oak/pull/2079#discussion_r1957124241


##########
oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImplTest.java:
##########
@@ -135,6 +135,26 @@ public void testOakToJcr() {
         }
     }
 
+    @Test
+    public void testOakToExpandedJcr() {
+        assertEquals("/{http://www.example.com/foo}bar";, 
npMapper.getExpandedJcrPath("/oak-foo:bar"));
+        
assertEquals("/{http://www.example.com/foo}bar/{http://www.example.com/quu}qux";,
 npMapper.getExpandedJcrPath("/oak-foo:bar/oak-quu:qux"));
+        assertEquals("{http://www.example.com/foo}bar";, 
npMapper.getExpandedJcrPath("oak-foo:bar"));
+        assertEquals(".", npMapper.getExpandedJcrPath(""));
+
+        try {
+            
npMapper.getExpandedJcrPath("{http://www.jcp.org/jcr/nt/1.0}unstructured";);

Review Comment:
   @reschke the argument is always expected to be an oak name (i.e. always 
qualified form), everything else is an error condition leading deliberately to 
an exception. However this can never be triggered when called from 
`JackrabbitSession.getExpandedName(Item item)` as the item at that point in 
time needs to have a oak name already.



-- 
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

Reply via email to