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

Deprecate for removal JavaBeanXxxPropertyBuilders constructors

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • jfx14
    • javafx
    • None
    • source
    • minimal
    • Java API
    • JDK

      Summary

      The public constructors of the classes javafx.beans.property.adapter.JavaBeanXxxPropertyBuilder and javafx.beans.property.adapter.ReadOnlyJavaBeanXxxPropertyBuilder (Xxx = Boolean, Float, Double, String, Object, Long, Int) was exposed by mistake and should be deprecated for removal.

      Problem

      The JavaBeanXxxPropertyBuilder and ReadOnlyJavaBeanXxxPropertyBuilder classes had a default public constructor up to JavaFX 12 by mistake. They have a static create() method that is used for instantiation.

      Solution

      In JavaFX 13 the constructors for JavaBeanXxxPropertyBuilder were made explicit with a doc comment that they will be removed in the future. In 14 they are to be deprecated for removal along with the constructors for ReadOnlyJavaBeanXxxPropertyBuilder. In 15 they are to be removed.

      Specification

      The @Deprecated(since="14", forRemoval=true) annotation was added to all JavaBeanXxxPropertyBuilders and ReadOnlyJavaBeanXxxPropertyBuilders as shown here for the Double variant:

      /**
       * @deprecated This constructor was exposed erroneously and will be removed in the next version. Use {@link #create()} instead.
       */
      @Deprecated(since="14", forRemoval=true)
      public JavaBeanDoublePropertyBuilder() {}
      JavaBeanBooleanPropertyBuilder()
      JavaBeanDoublePropertyBuilder()
      JavaBeanIntegerProperty()
      JavaBeanLongPropertyBuilder()
      JavaBeanFloatPropertyBuilder()
      JavaBeanStringPropertyBuilder()
      JavaBeanObjectPropertyBuilder()
      
      ReadOnlyJavaBeanBooleanPropertyBuilder()
      ReadOnlyJavaBeanDoublePropertyBuilder()
      ReadOnlyJavaBeanIntegerProperty()
      ReadOnlyJavaBeanLongPropertyBuilder()
      ReadOnlyJavaBeanFloatPropertyBuilder()
      ReadOnlyJavaBeanStringPropertyBuilder()
      ReadOnlyJavaBeanObjectPropertyBuilder()

            nlisker Nir Lisker
            nlisker Nir Lisker
            Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: