I did think about it, and it's not logical. Why do I want to lump getters and setters together to fit some artificial notion of a "property?" The answer is I don't. I don't think there's a justification for doing so that matters to users, and there are plenty of reason for a getter and setter to respectively return and accept different types. OGNL using Introspector and Introspector exhibiting this behavior is not a good reason.
Even if we did enforce this behavior purposefully, failing silently is evil. Bob On 6/27/06, Jason Carreira <[EMAIL PROTECTED]> wrote:
It has to do with the java.beans.Introspector. It doesn't find the properties correctly if the getter and setter don't match. It won't be able to figure out what the property type is if they aren't the same for the same name. I don't remember what the heuristic is, but if you think about it, it will either find a property based on the getter or the setter, with their respective types, but the property will only have one method, the getter or the setter, but not both. Each have their own problems and would keep bean binding with OGNL from working. --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=35707&messageID=69900#69900 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]