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

remove no-arg constructor from ToolProvider

    XMLWordPrintable

Details

    • CSR
    • Status: Closed
    • P4
    • Resolution: Approved
    • 16
    • tools
    • None
    • source, binary, behavioral
    • minimal
    • Little expected usage of this constructor.
    • Java API
    • SE

    Description

      Summary

      An explicit constructor in ToolProvider, deprecated for removal, replaced a default constructor. The time has come to "remove" the constructor by making it private and thus on longer part of the external API of the class.

      Problem

      A deprecated-for-removal constructor is not yet removed from the API.

      Solution

      Remove the no-arg constructor by making it private.

      Specification

       --- old/src/java.compiler/share/classes/javax/tools/ToolProvider.java  2020-07-17 10:26:50.446004000 -0700
      +++ new/src/java.compiler/share/classes/javax/tools/ToolProvider.java   2020-07-17 10:26:49.794004000 -0700
      @@ -44,11 +44,7 @@
           private static final String systemJavaCompilerModule = "jdk.compiler";
           private static final String systemJavaCompilerName   = "com.sun.tools.javac.api.JavacTool";
      
      -    /**
      -     * Do not call.
      -     */
      -    @Deprecated(forRemoval=true, since="14")
      -    public ToolProvider() {}
      +    private ToolProvider() {}
      
           /**
            * Returns the Java programming language compiler provided

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              smarks Stuart Marks
              Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: