[
https://issues.apache.org/jira/browse/OAK-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556345#comment-13556345
]
Jukka Zitting commented on OAK-563:
-----------------------------------
I would assume that a typical client in such a case doesn't really care whether
the namespace used in a name or path is known or not. The client either uses a
hard-coded path or is given the path from somewhere else, and is supposed to do
something with the referenced node. For such a client the relevant question is
whether a node exists at that given path, not whether the given path is valid.
For example, consider a simple case like this:
{code}
private static final String DC_TITLE =
"{http://purl.org/dc/elements/1.1/}title";
String title = JcrUtils.getStringProperty(node, DC_TITLE, "");
{code}
IMHO the right thing to do here when the namespace isn't registered in a
particular repository, is for {{JcrUtils.getStringProperty()}} to return the
given default value "" as the title string, not to end up throwing a
{{RepositoryException}}. On the other hand, if there really is some internal
repository access problem, the method should still let the
{{RepositoryException}} percolate up to the client instead of capturing it and
assuming that it's caused by an unregistered namespace.
> Rename SessionDelegate...OrThrow methods
> ----------------------------------------
>
> Key: OAK-563
> URL: https://issues.apache.org/jira/browse/OAK-563
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Michael Dürig
> Assignee: Michael Dürig
> Fix For: 0.6
>
> Attachments: OAK-563.patch
>
>
> As a fallout of OAK-553 there are some inconsistency in method naming in
> {{SessionDelegate}} now. We should align the names of the ...OrThrow methods.
> That is, drop the OrThrow suffixes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira