Multiple setters for a bean and a Spring warning

Tom Zeller tzeller at dragonacea.biz
Fri Mar 28 11:58:30 EDT 2014


>> A quick look at the Spring source makes me wonder if providing the
>> accessor method, i.e. getBasicCredential(), might not trigger that
>> warning.
>
> Adding that certainly does seem to do the trick.  I wonder why?

public GenericTypeAwarePropertyDescriptor(...
  ...
  if (this.writeMethod != null && this.readMethod == null) {
    // Write method not matched against read method: potentially
ambiguous through
    // several overloaded variants, in which case an arbitrary winner
has been chosen
    // by the JDK's JavaBeans Introspector...


More information about the dev mailing list