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

Manfred Baedke commented on OAK-11486:
--------------------------------------

Software might be badly designed, API consumers might lack the proper exception 
handling in the right place. Preferably, that would be fixed on the consumer 
side, but we can't be sure that existing software doesn't rely on 
implementation details. [~reschke]?

> 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