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

Deprecate for removal protected access members in DateTimeStringConverter

XMLWordPrintable

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

      Summary

      DateTimeStringConverter exposes internal implementation details by mistake. They are made deprecated for removal.

      Problem

      DateTimeStringConverter has protected members that allow access to its internal state. These should not be part of the public API.

      Solution

      Deprecate for removal the protected access members so that they can be removed from public API.

      Specification

       .../util/converter/DateTimeStringConverter.java   | 15 +++++++++++++++
       1 file changed, 15 insertions(+)
      
      diff --git a/modules/javafx.base/src/main/java/javafx/util/converter/DateTimeStringConverter.java b/modules/javafx.base/src/main/java/javafx/util/converter/DateTimeStringConverter.java
      index 1b81bc5f9d..ae18858310 100644
      --- a/modules/javafx.base/src/main/java/javafx/util/converter/DateTimeStringConverter.java
      +++ b/modules/javafx.base/src/main/java/javafx/util/converter/DateTimeStringConverter.java
      @@ -44,20 +44,33 @@
      
           // ------------------------------------------------------ Private properties
      
      +    /**
      +     * @deprecated This field was exposed erroneously and will be removed in a future version.
      +     */
      +   @Deprecated(forRemoval = true, since = "17")
           protected final Locale locale;
      +
      +    /**
      +     * @deprecated This field was exposed erroneously and will be removed in a future version.
      +     */
      +   @Deprecated(forRemoval = true, since = "17")
           protected final String pattern;
      +
      +    /**
      +     * @deprecated This field was exposed erroneously and will be removed in a future version.
      +     */
      +   @Deprecated(forRemoval = true, since = "17")
           protected final DateFormat dateFormat;
      
           /**
      +     * @deprecated This field was exposed erroneously and will be removed in a future version.
            * @since JavaFX 8u40
            */
      +   @Deprecated(forRemoval = true, since = "17")
           protected final int dateStyle;
      
           /**
      +     * @deprecated This field was exposed erroneously and will be removed in a future version.
            * @since JavaFX 8u40
            */
      +   @Deprecated(forRemoval = true, since = "17")
      @@ -205,6 +218,8 @@ public DateTimeStringConverter(DateFormat dateFormat) {
            *
            * @return a {@code DateFormat} instance for formatting and parsing in this
            * {@link StringConverter}
      +     *
      +     * @deprecated This method exposes internal implementation details and will be removed in a future version.
            */
      +   @Deprecated(forRemoval = true, since = "17")
           protected DateFormat getDateFormat() {

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

              Created:
              Updated:
              Resolved: