[From nobody Fri Aug 6 17:04:22 2004 X-Apparently-To: xiarcel@yahoo.com via web1204.mail.yahoo.com Return-Path: <jdom-interest-admin@jdom.org> X-Track: 1: 40 Received: from dorothy.denveronline.net (206.168.141.2) by mta201.mail.yahoo.com with SMTP; 27 Jun 2000 10:51:19 -0700 (PDT) Received: from dorothy (localhost [127.0.0.1]) by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id LAA28594; Tue, 27 Jun 2000 11:46:58 -0600 (MDT) Received: from netmagik.lutris.com ([63.104.189.30]) by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id LAA28584 for <jdom-interest@jdom.org>; Tue, 27 Jun 2000 11:46:55 -0600 (MDT) Received: from lutris.com ([10.10.50.131]) by netmagik.lutris.com (Netscape Messaging Server 3.6) with ESMTP id 151; Tue, 27 Jun 2000 11:10:53 -0700 Message-ID: <3958EA9B.4C4E16DF@lutris.com> Date: Tue, 27 Jun 2000 12:55:39 -0500 From: Brett McLaughlin <brett.mclaughlin@lutris.com> Organization: Lutris Technologies X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Patrick Dowler <Patrick.Dowler@nrc.ca> CC: Dave Hurrell <dave@greatchiro.com>, jdom-interest@jdom.org Subject: Re: [jdom-interest] NoSuch*Exceptions in JDOM References: <39489DAB.8C3332FC@student.fmf.uni-lj.si> <39544754.1FE3301C@greatchiro.com> <00062710090713.00381@kitasoo.hia.nrc.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: jdom-interest-admin@jdom.org Errors-To: jdom-interest-admin@jdom.org X-BeenThere: jdom-interest@jdom.org X-Mailman-Version: 2.0beta2 Precedence: bulk List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org> Content-Length: 1938 Patrick Dowler wrote: > > On Fri, 23 Jun 2000, you wrote: > > I suggest a new method following the java.util.Properties pattern > > meets the underlying need and solves your problem. Namely: > > > > public Element getChild(String aString, Object defaultValue) > > > > It does not throw a NoSuchElementException and can return > > a null, "" or 0 as appropriate. -GreatOne-- > > This seems to go totally against what most people are trying to do. If > you call getChild, you really want to know if the child was there or not. > Having a default value returned doesn't seem too useful for anyone... > correct me if I'm wrong on that :-) > > For something simple like Properties, it makes sense. For a child > element, you could be talking about a whole structure ( the "body" > child of an "html" Element, for example). > > Did this ever get resolved? What is the current standing of returning > null vs. throwing NoSuchElementException from getChild? I got the > feeling last week that we have not reached any consensus on this... We're still sort of letting this run its course. I'm still /not/ for null, but we're going to let this go on a bit. So far, I've seen remarkably little in the way of resolution (people are still voicing their opinions, which is good), so we're just ... waiting... ;-) -Brett > > I'm still for a null return value. > -- > > Patrick Dowler > Canadian Astronomy Data Centre > > _______________________________________________ > To control your jdom-interest membership: > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com -- Brett McLaughlin, Enhydra Strategist Lutris Technologies, Inc. 1200 Pacific Avenue, Suite 300 Santa Cruz, CA 95060 USA http://www.lutris.com http://www.enhydra.org _______________________________________________ To control your jdom-interest membership: http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com]