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

JavaBeanObjectPropertyBuilder not reusable when used with different classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8u20
    • javafx
    • None

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: