Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 61059 invoked from network); 9 May 2003 01:56:11 -0000 Received: from inet03.citec.qld.gov.au (203.5.10.10) by daedalus.apache.org with SMTP; 9 May 2003 01:56:11 -0000 Received: by inet03.citec.qld.gov.au; id h491uIf57985; Fri, 9 May 2003 11:56:18 +1000 (EST) Received: from dnrsweep.dnr.qld.gov.au( 203.8.130.181) by inet03.citec.qld.gov.au via smap (V2.0) id xma052178; Fri, 9 May 03 11:53:38 +1000 Received: from chqfolders.lands.resnet.qg (unverified) by dnrsweep.dnr.qld.gov.au (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Fri, 9 May 2003 11:47:40 +1000 Received: from chqmail2.lands.resnet.qg ([203.8.130.170]) by chqfolders.lands.resnet.qg with Microsoft SMTPSVC(5.0.2195.5329); Fri, 9 May 2003 11:53:37 +1000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: [beanutils] problem with PropertyUtils.getNestedProperty(Object, name) throwing too many IllegalArgumentExceptions Date: Fri, 9 May 2003 11:53:37 +1000 Message-ID: <088AED8CEAB47C4E8FB3EA0465FABF00C8DF5A@chqmail2.lands.resnet.qg> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [beanutils] problem with PropertyUtils.getNestedProperty(Object, name) throwing too many IllegalArgumentExceptions Thread-Index: AcMVzc6miwkiwOTTQ8axGdqua8wXVQ== From: "Tolley Shorn" To: X-OriginalArrivalTime: 09 May 2003 01:53:37.0757 (UTC) FILETIME=[CEBE68D0:01C315CD] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi folks, Please let me know if I should be posting this message to a different place. I have a problem with the PropertyUtils.getNestedProperty(Object, name) met= hod. It documents that it throws an IllegalArgumentException "if a nested refere= nce to a property returns null". Which is great, because I want to actually trap that exact situation and de= al with it explicitly. Unfortunately, the method throws IllegalArgumentException for a number of = other situations. Also, because it's a runtime exception I have to assume = that exception could be thrown from anywhere in the call stack. Is there another way to do what I want to do without deplicating the code o= f the getNestedProperty() method? Currently, I'm building my own beanutils jar, and having the getNestedPrope= rty() method throw an explicitly created subclass of InvocationTargetExcept= ion (NullNestedReferenceException) that I can catch in my calling code. I'd like to use an official build of beanutils though (rather than my own o= ne). If there's not a better way to do what I want, how do I go about requesting= that this functionality be added to CVS (possibly with my own patch if the= developers find it acceptable)? Thanks, Shorn Tolley. ************************************************************************ The information in this e-mail together with any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any form of review, disclosure, modification, distribution and/or publication of this e-mail message is prohibited. =20 If you have received this message in error, you are asked to inform the sender as quickly as possible and delete this message and any copies of this message from your computer and/or your computer system network. =20 ************************************************************************