You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/01/20 18:32:31 UTC

DO NOT REPLY [Bug 16266] New: - BeanPropertySetter fails silently when property doesn't exist

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16266>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16266

BeanPropertySetter fails silently when property doesn't exist

           Summary: BeanPropertySetter fails silently when property doesn't
                    exist
           Product: Commons
           Version: 1.3 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: kcbaltz@yahoo.com


The BeanPropertySetter rule fails silently if the bean property named doesn't 
exist.  It should at the very least print a warning to the logging stream.  
Perhaps it should throw a NoSuchMethod exception.  I'm attaching an example of 
the problem.  The key section is:

    Digester digester = new Digester();
    digester.addObjectCreate( "Calendar", GregorianCalendar.class );
    digester.addBeanPropertySetter( "Calendar/millis", "TimeInMillis" );

Note that the property name is "TimeInMillis" when it should correctly 
be "timeInMillis".  An easy mistake to make, but difficult for the novice 
Digester user to track down.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>