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

JavaBeanObjectPropertyBuilder not reusable when used with different classes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:

      Description

      Javadoc on beanClass(Class) method (only this one method) says that the JavaBeanObjectPropertyBuilder should be able to generate adapters for Java Beans of different types and that this method is useful in this situation. But doing so ( calling only .beanClass(Class) ) results in creation of JavaBeanObjectProperty object that throws "java.lang.IllegalArgumentException: object is not an instance of declaring class" as a result of either getValue() or setValue(Object) method calls.

      Problem is that calling beanClass(Class) method does not help to reuse this component once the build() method has been successfully executed. The only way to reuse instantiated builder is to call both setter(Method) and getter(Method) with null as argument.

        Attachments

          Activity

            People

            Assignee:
            msladecek Martin Sládeček
            Reporter:
            lvitasekjfx Lukas Vitasek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: