[
https://issues.apache.org/jira/browse/OAK-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556361#comment-13556361
]
Michael Dürig commented on OAK-563:
-----------------------------------
I still don't think {{PathNotFoundException}} is the right exception when in
fact an invalid argument has been passed to the method. In the {{JcrUtils}}
example above you could pass virtually everything which is not a valid path to
the path argument and always get the default value in return. This opens room
for programming errors to go undetected.
However since this seems to be a backward compatibility issue, what we could do
to give at least the callers who want to differentiate between the two error
cases is to add a cause for the exception (e.g. {{IllegalArgumentException}}).
> 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