JDK-8258522 : Remove terminally deprecated constructor in java.net.URLDecoder
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 17
  • Submitted: 2020-12-16
  • Updated: 2021-01-07
  • Resolved: 2021-01-07
Related Reports
CSR :  
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;


Comments
Moving to Approved.
06-01-2021

The typical notice period between terminal deprecation and removal is one year. In this case, however, the API is not actually useful for anything, and it serves no purpose. Therefore, there's no benefit to keeping it in the platform for a full year.
05-01-2021