JDK-8221244 : Unexpected behavior of PropertyDescription.getReadMethod for boolean properties
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 11,12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-03-21
  • Updated: 2019-08-21
  • Resolved: 2019-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.4Fixed 13 b15Fixed
Related Reports
Relates :  
Description
Described here:
https://mail.openjdk.java.net/pipermail/beans-dev/2019-March/000405.html

The behavior of PropertyDescription.getReadMethod has been changed for boolean properties. Previously (for 8), the "is" getter was used when both "is"/"get" getters provided. However now (since 9), the "get" getter is used in this case.

It violates the JavaBeans API spec, quotation from the spec - This "is<PropertyName>" method may be provided instead of a "get<PropertyName>" method, or it may be provided in addition to a "get<PropertyName>" method. In either case, if the "is<PropertyName>" method is present for a boolean property then we will use the "is<PropertyName>" method to read the property value.
Comments
Fix request for 11u: The issue is a violation of the JavaBeans spec. The patch applies cleanly. The regression test (test/jdk/java/beans/Introspector/Test8221244.java) fails without the patch and starts passing with the patch applied.
26-04-2019

RFR: https://mail.openjdk.java.net/pipermail/beans-dev/2019-March/000408.html
25-03-2019

Initially reported here: https://mail.openjdk.java.net/pipermail/beans-dev/2019-March/000405.html
21-03-2019