< prev index next >

src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java

Print this page
rev 54252 : 8221244: Unexpected behavior of PropertyDescription.getReadMethod for boolean properties
Reviewed-by: serb

*** 70,83 **** private PropertyInfo() { } private boolean initialize() { if (this.read != null) { this.type = this.read.type; } ! if (this.readList != null) { for (MethodInfo info : this.readList) { if ((this.read == null) || this.read.type.isAssignableFrom(info.type)) { this.read = info; this.type = info.type; } --- 70,85 ---- private PropertyInfo() { } private boolean initialize() { + boolean isInitedToIsGetter = false; if (this.read != null) { this.type = this.read.type; + isInitedToIsGetter = isPrefix(this.read.method.getName(), "is"); } ! if (!isInitedToIsGetter && this.readList != null) { for (MethodInfo info : this.readList) { if ((this.read == null) || this.read.type.isAssignableFrom(info.type)) { this.read = info; this.type = info.type; }
< prev index next >