https://bz.apache.org/bugzilla/show_bug.cgi?id=63898
Mark Thomas <ma...@apache.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas <ma...@apache.org> --- TL;DR The JSP specification says that tags should only have one setter per property. I've spent some time looking into this an, interestingly, I have seen both behaviours with Oracle Java 8u172. I'm not sure if using a debugger influenced the behaviour or if other factors were involved. Digging into the JavaBeans Introspector code, when there are multiple setters and no other information to indicate that one should have priority over another (such as only one having a matching getter) then the first setter found it used. I suspect what is happening is that the order in which the methods are returned is varying since the various reflection class to obtain methods don't specify a return order. However, all of this is moot due to text present in the JSP specification. The section numbering seems a little off so if you search for the text "implication" and then look at the second instance you'll find the following: <quote> The setter methods that should be used when assigning a value to an attribute of a custom action are determined by using the JavaBeans introspector on the tag handler class, then use the setter method associated with the property that has the same name as the attribute in question. An implication (unclear in the JavaBeans specification) is that there is only one setter per property. </quote> Interestingly, it is only the name that is used to do the matching. The type is not used. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org