src/share/classes/com/sun/tools/apt/main/Main.java

Print this page

        

@@ -62,10 +62,11 @@
  *  <p><b>This is NOT part of any API supported by Sun Microsystems.
  *  If you write code that depends on this, you do so at your own
  *  risk.  This code and its internal interfaces are subject to change
  *  or deletion without notice.</b>
  */
+@SuppressWarnings("deprecation")
 public class Main {
 
     /** For testing: enter any options you want to be set implicitly
      *  here.
      */

@@ -778,11 +779,10 @@
 
         // For testing: assume all arguments in forcedOpts are
         // prefixed to command line arguments.
         processArgs(forcedOpts);
 
-
         /*
          * A run of apt only gets passed the most recently generated
          * files; the initial run of apt gets passed the files from
          * the command line.
          */

@@ -790,10 +790,15 @@
         java.util.List<String> origFilenames;
         try {
             // assign args the result of parse to capture results of
             // '@file' expansion
             origFilenames = processArgs((args=CommandLine.parse(args)));
+
+            if (options.get("suppress-tool-api-removal-message") == null) {
+                Bark.printLines(out, getLocalizedString("misc.Deprecation"));
+            }
+
             if (origFilenames == null) {
                 return EXIT_CMDERR;
             } else if (origFilenames.size() == 0) {
                 // it is allowed to compile nothing if just asking for help
                 if (options.get("-help") != null ||