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

Julian Reschke commented on OAK-11486:
--------------------------------------

I agree with [~baedke] here (but I'm surely unhappy with that).

> Session-local namespace mappings for unregistered namespace URIs lead to 
> unexpected ISE for Node.getName() or Node.getPath()
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 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
>            Assignee: Manfred Baedke
>            Priority: Major
>              Labels: namespace
>
> 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()}} or {{Node.getPath()}} methods leads to an 
> unexpected ISE.
> According to 
> [https://developer.adobe.com/experience-manager/reference-materials/spec/jcr/2.0/3_Repository_Model.html#3.5.2%20Session-Local%20Mappings]
> bq. If a JCR method is passed a name or path containing a prefix which does 
> not exist in the local mapping an exception is thrown.
> Therefore I would expect that adding a node with an unknown prefix leads to 
> an exception immediately (without waiting for save()) while adding a node 
> with a only local mapping should not throw an exception at all.



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

Reply via email to