You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Stefan Guggisberg (Commented) (JIRA)" <ji...@apache.org> on 2012/04/05 14:21:25 UTC

[jira] [Commented] (OAK-48) MicroKernel.getNodes() should return null for not existing nodes instead of throwing an exception

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

Stefan Guggisberg commented on OAK-48:
--------------------------------------

> Requesting a not existing node through Microkernel.getNodes() should therefore rather return null instead of throwing an exception.

i am not convinced. IMO requesting a non-existing node is rather an exception. 
there's the nodeExists() method if you want to check whether a node at a given 
path exists. 
                
> MicroKernel.getNodes() should return null for not existing nodes instead of throwing an exception
> -------------------------------------------------------------------------------------------------
>
>                 Key: OAK-48
>                 URL: https://issues.apache.org/jira/browse/OAK-48
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: mk
>            Reporter: Michael Dürig
>
> As discussed on the list [1, 2] exceptions should only be used for exceptional cases. Requesting a not existing node through Microkernel.getNodes() should therefore rather return null instead of throwing an exception.
> [1] http://markmail.org/thread/agibgcdjv756m53u
> [2] http://markmail.org/message/gfbmogwr6mrhe2pm

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira