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 82901 invoked from network); 29 May 2003 23:29:42 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 29 May 2003 23:29:42 -0000 Received: (qmail 3893 invoked by uid 1059); 29 May 2003 23:29:41 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 29 May 2003 23:29:41 -0000 Date: Thu, 29 May 2003 16:29:40 -0700 (PDT) From: "Craig R. McClanahan" To: Jakarta Commons Users List Subject: Re: [Digester] - Read only methods In-Reply-To: <01da01c3254f$3df8b760$2b7aeb9d@pgh.symbol.com> Message-ID: <20030529162541.O1931@icarus.apache.org> References: <01da01c3254f$3df8b760$2b7aeb9d@pgh.symbol.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 28 May 2003, Sloan Seaman wrote: > Date: Wed, 28 May 2003 15:27:56 -0400 > From: Sloan Seaman > Reply-To: Jakarta Commons Users List > To: commons-user@jakarta.apache.org > Subject: [Digester] - Read only methods > > Is there any way to get Digester to call methods that it thinks are read only? > > I have a public void setActionMappingClass(String) that Digester does > not call because the get is public Class getActionMappingClass() instead > of a public String getActionMappingClass().... > > Just seems odd that Digester would be so strict... > Digester isn't being strict -- your class is breaking the JavaBeans design pattern requirements for recognizing properties. This only matters when you are trying to use rules like SetPropertyRule or SetPropertiesRule that rely on a promise from you that your beans obey the rules. Your class does not conform, so you should not be surprised by this. You can investigate using something like SetNextRule, where you can explicitly define the name of the method to be called, and the argument type it takes. However, you'll save yourself lots of other work later if you just make sure that your classes are proper JavaBeans instead. > Thanks! > > -- > Sloan Craig