struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Carreira <>
Subject Re: OGNL - Getter and setter types must match
Date Tue, 27 Jun 2006 22:18:59 GMT
> 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.

Well, unless we want to rewrite OGNL to not use the native reflection capabilities of JavaBeans,
and write our own based on name patterns only, I think we're stuck with it. It's really not
that bad. Rename either the getter or the setter.

> Even if we did enforce this behavior purposefully,
> failing silently is evil.

Well, yes... But if you have the dev mode on, it will log errors for web parameters that don't
match bean properties. 
> Bob
Posted via Jive Forums

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message