Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8221244

Unexpected behavior of PropertyDescription.getReadMethod for boolean properties

    Details

    • Subcomponent:
    • Introduced In Build:
      b24
    • Introduced In Version:
      9
    • Resolved In Build:
      b15

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dcherepanov Dmitry Cherepanov
                  Reporter:
                  dcherepanov Dmitry Cherepanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: