You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Simon Kitching <si...@ecnetwork.co.nz> on 2003/02/04 00:35:59 UTC

[digester] - v1.4 breaks existing code : property has no getter method

Hi,

I have just downloaded release 1.4 of digester & given it a spin.

My existing code now fails with the following exception:

ERROR: org.apache.commons.digester.Digester: 2003-02-04 11:08:52,011
[main] (Digester.java:1066) - End event threw exception
java.lang.NoSuchMethodException: Property 'identifier' has no getter
method

Is this related to the fix for bug 16233, "Invalid bean setters do not
generate an exception"?

I believe the error message is referring to the fact that I have classes
instantiated/populated via digester rules which have setter methods
without getter methods (eg setIdentifier without getIdentifier in this
case). The attributes being set are only accessed by the class
concerned, and therefore it makes no sense for these to have getter
methods. I understand that this might be a violation of the "java bean"
rules, but I don't believe that digester is intended to populate only
beans.

I agree with the original bug that a rule which explicitly tries to set
a nonexistent property should report an error; I am hoping the above
problem is an accidental side-effect of the fix for this.

Any comments?

Regards,

Simon