From oak-dev-return-577-apmail-jackrabbit-oak-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Apr 5 12:21:48 2012 Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0E8D96FB for ; Thu, 5 Apr 2012 12:21:48 +0000 (UTC) Received: (qmail 97624 invoked by uid 500); 5 Apr 2012 12:21:48 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 97601 invoked by uid 500); 5 Apr 2012 12:21:48 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 97593 invoked by uid 99); 5 Apr 2012 12:21:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 12:21:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 12:21:46 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 488C735AD08 for ; Thu, 5 Apr 2012 12:21:25 +0000 (UTC) Date: Thu, 5 Apr 2012 12:21:25 +0000 (UTC) From: "Stefan Guggisberg (Commented) (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <1124589135.16729.1333628485313.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <26859860.16515.1333623804587.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (OAK-48) MicroKernel.getNodes() should return null for not existing nodes instead of throwing an exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-48?page=3Dcom.atlassian.jir= a.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13247184= #comment-13247184 ]=20 Stefan Guggisberg commented on OAK-48: -------------------------------------- > Requesting a not existing node through Microkernel.getNodes() should ther= efore rather return null instead of throwing an exception. i am not convinced. IMO requesting a non-existing node is rather an excepti= on.=20 there's the nodeExists() method if you want to check whether a node at a gi= ven=20 path exists.=20 =20 > 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=C3=BCrig > > As discussed on the list [1, 2] exceptions should only be used for except= ional 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 administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira