You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Manfred Baedke (Jira)" <ji...@apache.org> on 2025/02/18 13:11:00 UTC
[jira] [Commented] (OAK-11486) Session-local namespace mappings for unregistered namespace URIs lead to unexpected ISE for Node.getName() or Node.getPath()
[ https://issues.apache.org/jira/browse/OAK-11486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928079#comment-17928079 ]
Manfred Baedke commented on OAK-11486:
--------------------------------------
[~kwin], [~reschke],
??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.??
I agree that this reads like every JCR method should throw an exception immediately if an unknown prefix is passed as a parameter. So this applies to multiple methods, because I think we are not doing this anywhere. Separate issue?
> 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)