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

Remove terminally deprecated constructor in java.net.URLDecoder

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source, binary, behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      While this is a binary incompatible change, the usage of the constructor is expected to be low and the static methods can be called directly without using a class instance.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The constructor of java.net.URLDecoder was terminally deprecated and should be removed.

      Problem

      Default constructor accidentally included in a class.

      Solution

      Remove the terminally deprecated constructor by making it private.

      Specification

      --- a/src/java.base/share/classes/java/net/URLDecoder.java
      +++ b/src/java.base/share/classes/java/net/URLDecoder.java
      @@ -84,8 +84,7 @@ public class URLDecoder {
           /**
            * Do not call.
            */
      -    @Deprecated(since="16", forRemoval=true)
      -    public URLDecoder() {}
      +    private URLDecoder() {}
      
           // The platform default encoding
           static String dfltEncName = URLEncoder.dfltEncName;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Reviewed By:
              Brian Burkhalter, Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: