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

Deprecate for removal JavaBeanXxxPropertyBuilders constructors

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: openjfx14
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      JDK

      Description

      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()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nlisker Nir Lisker
                Reporter:
                nlisker Nir Lisker
                Reviewed By:
                Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: