8148808: javac, remove unused options, step 1
authorvromero
Wed, 10 Feb 2016 15:11:40 -0800
changeset 35810 9ee6e90d679c
parent 35809 f02d72332452
child 35811 3779fa4164c2
8148808: javac, remove unused options, step 1 Reviewed-by: mcimadamore, jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
langtools/test/tools/javac/T6873845.java
langtools/test/tools/javac/diags/CheckResourceKeys.java
langtools/test/tools/javac/diags/examples.not-yet.txt
langtools/test/tools/javac/diags/examples/SunApiFilename.java
langtools/test/tools/javac/diags/examples/SunApiFilenameAdditional.java
langtools/test/tools/javac/diags/examples/SunApiPlural/SunApiPlural.java
langtools/test/tools/javac/diags/examples/SunApiPluralAdditional/SunApiPluralAdditional.java
langtools/test/tools/javac/lambda/Conditional01.java
langtools/test/tools/javac/lambda/Conditional02.java
langtools/test/tools/javac/lambda/Conditional03.java
langtools/test/tools/javac/lambda/TargetType27.java
langtools/test/tools/javac/lambda/TargetType34.java
langtools/test/tools/javac/warnings/6594914/T6594914b.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -218,11 +218,6 @@
         STATIC("static"),
 
         /**
-         * Warn about proprietary API that may be removed in a future release.
-         */
-        SUNAPI("sunapi", true),
-
-        /**
          * Warn about issues relating to use of try blocks (i.e. try-with-resources)
          */
         TRY("try"),
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,6 @@
     private final JCDiagnostic.Factory diags;
     private boolean warnOnSyntheticConflicts;
     private boolean suppressAbortOnBadClassFile;
-    private boolean enableSunApiLintControl;
     private final JavaFileManager fileManager;
     private final Source source;
     private final Profile profile;
@@ -131,10 +130,8 @@
         allowStrictMethodClashCheck = source.allowStrictMethodClashCheck();
         allowPrivateSafeVarargs = source.allowPrivateSafeVarargs();
         allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation();
-        complexInference = options.isSet("complexinference");
         warnOnSyntheticConflicts = options.isSet("warnOnSyntheticConflicts");
         suppressAbortOnBadClassFile = options.isSet("suppressAbortOnBadClassFile");
-        enableSunApiLintControl = options.isSet("enableSunApiLintControl");
         warnOnAccessToSensitiveMembers = options.isSet("warnOnAccessToSensitiveMembers");
 
         Target target = Target.instance(context);
@@ -144,14 +141,13 @@
 
         boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
         boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
-        boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
         boolean enforceMandatoryWarnings = true;
 
         deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated,
                 enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION);
         uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
                 enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED);
-        sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi,
+        sunApiHandler = new MandatoryWarningHandler(log, false,
                 enforceMandatoryWarnings, "sunapi", null);
 
         deferredLintHandler = DeferredLintHandler.instance(context);
@@ -177,10 +173,6 @@
      */
     boolean allowDiamondWithAnonymousClassCreation;
 
-    /** Switch: -complexinference option set?
-     */
-    boolean complexInference;
-
     /** Character for synthetic names
      */
     char syntheticNameChar;
@@ -248,15 +240,6 @@
             log.warning(LintCategory.VARARGS, pos, key, args);
     }
 
-    /** Warn about using proprietary API.
-     *  @param pos        Position to be used for error reporting.
-     *  @param msg        A string describing the problem.
-     */
-    public void warnSunApi(DiagnosticPosition pos, String msg, Object... args) {
-        if (!lint.isSuppressed(LintCategory.SUNAPI))
-            sunApiHandler.report(pos, msg, args);
-    }
-
     public void warnStatic(DiagnosticPosition pos, String msg, Object... args) {
         if (lint.isEnabled(LintCategory.STATIC))
             log.warning(LintCategory.STATIC, pos, msg, args);
@@ -3226,13 +3209,8 @@
 
     void checkSunAPI(final DiagnosticPosition pos, final Symbol s) {
         if ((s.flags() & PROPRIETARY) != 0) {
-            deferredLintHandler.report(new DeferredLintHandler.LintLogger() {
-                public void report() {
-                    if (enableSunApiLintControl)
-                      warnSunApi(pos, "sun.proprietary", s);
-                    else
-                      log.mandatoryWarning(pos, "sun.proprietary", s);
-                }
+            deferredLintHandler.report(() -> {
+                log.mandatoryWarning(pos, "sun.proprietary", s);
             });
         }
     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,6 @@
     public final boolean allowMethodHandles;
     public final boolean allowFunctionalInterfaceMostSpecific;
     public final boolean checkVarargsAccessAfterResolution;
-    private final boolean debugResolve;
     private final boolean compactMethodDiags;
     final EnumSet<VerboseResolutionMode> verboseResolutionMode;
 
@@ -120,7 +119,6 @@
         diags = JCDiagnostic.Factory.instance(context);
         Source source = Source.instance(context);
         Options options = Options.instance(context);
-        debugResolve = options.isSet("debugresolve");
         compactMethodDiags = options.isSet(Option.XDIAGS, "compact") ||
                 options.isUnset(Option.XDIAGS) && options.isUnset("rawDiagnostics");
         verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options);
@@ -3897,8 +3895,6 @@
             super(HIDDEN, sym, "access error");
             this.env = env;
             this.site = site;
-            if (debugResolve)
-                log.error("proc.messager", sym + " @ " + site + " is inaccessible.");
         }
 
         @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,11 +91,6 @@
      */
     boolean verbose;
 
-    /** Switch: check class file for correct minor version, unrecognized
-     *  attributes.
-     */
-    boolean checkClassFile;
-
     /** Switch: read constant pool and code sections. This switch is initially
      *  set to false but can be turned on from outside.
      */
@@ -230,7 +225,6 @@
 
         Options options = Options.instance(context);
         verbose         = options.isSet(VERBOSE);
-        checkClassFile  = options.isSet("-checkclassfile");
 
         Source source = Source.instance(context);
         allowSimplifiedVarargs = source.allowSimplifiedVarargs();
@@ -1148,15 +1142,6 @@
             attributeReaders.put(r.name, r);
     }
 
-    /** Report unrecognized attribute.
-     */
-    void unrecognized(Name attrName) {
-        if (checkClassFile)
-            printCCF("ccf.unrecognized.attribute", attrName);
-    }
-
-
-
     protected void readEnclosingMethodAttr(Symbol sym) {
         // sym is a nested class with an "Enclosing Method" attribute
         // remove sym from it's current owners scope and place it in
@@ -1279,7 +1264,6 @@
             if (r != null && r.accepts(kind))
                 r.read(sym, attrLen);
             else  {
-                unrecognized(attrName);
                 bp = bp + attrLen;
             }
         }
@@ -2315,8 +2299,7 @@
         int maxMinor = Version.MAX().minor;
         if (majorVersion > maxMajor ||
             majorVersion * 1000 + minorVersion <
-            Version.MIN().major * 1000 + Version.MIN().minor)
-        {
+            Version.MIN().major * 1000 + Version.MIN().minor) {
             if (majorVersion == (maxMajor + 1))
                 log.warning("big.major.version",
                             currentClassFile,
@@ -2329,13 +2312,7 @@
                                    Integer.toString(maxMajor),
                                    Integer.toString(maxMinor));
         }
-        else if (checkClassFile &&
-                 majorVersion == maxMajor &&
-                 minorVersion > maxMinor)
-        {
-            printCCF("found.later.version",
-                     Integer.toString(minorVersion));
-        }
+
         indexPool();
         if (signatureBuffer.length < bp) {
             int ns = Integer.highestOneBit(bp) << 1;
@@ -2455,14 +2432,6 @@
         return flags & ~ACC_SUPER; // SUPER and SYNCHRONIZED bits overloaded
     }
 
-    /** Output for "-checkclassfile" option.
-     *  @param key The key to look up the correct internationalized string.
-     *  @param arg An argument for substitution into the output string.
-     */
-    private void printCCF(String key, Object arg) {
-        log.printLines(key, arg);
-    }
-
     /**
      * A subclass of JavaFileObject for the sourcefile attribute found in a classfile.
      * The attribute is only the last component of the original filename, so is unlikely
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -373,7 +373,6 @@
                 throw new Abort();
         }
         source = Source.instance(context);
-        Target target = Target.instance(context);
         attr = Attr.instance(context);
         chk = Check.instance(context);
         gen = Gen.instance(context);
@@ -393,7 +392,6 @@
         stubOutput    = options.isSet("-stubs");
         relax         = options.isSet("-relax");
         printFlat     = options.isSet("-printflat");
-        attrParseOnly = options.isSet("-attrparseonly");
         encoding      = options.get(ENCODING);
         lineDebugInfo = options.isUnset(G_CUSTOM) ||
                         options.isSet(G_CUSTOM, "lines");
@@ -405,7 +403,8 @@
 
         verboseCompilePolicy = options.isSet("verboseCompilePolicy");
 
-        if (attrParseOnly)
+        if (options.isSet("shouldStopPolicy") &&
+            CompileState.valueOf(options.get("shouldStopPolicy")) == CompileState.ATTR)
             compilePolicy = CompilePolicy.ATTR_ONLY;
         else
             compilePolicy = CompilePolicy.decode(options.get("compilePolicy"));
@@ -452,10 +451,6 @@
      */
     public boolean stubOutput;
 
-    /** Generate attributed parse tree only.
-     */
-    public boolean attrParseOnly;
-
     /** Switch: relax some constraints for producing the jsr14 prototype.
      */
     boolean relax;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -766,10 +766,6 @@
 
         // Run contributing processors that haven't run yet
         psi.runContributingProcs(renv);
-
-        // Debugging
-        if (options.isSet("displayFilerState"))
-            filer.displayState();
     }
 
     /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Feb 10 15:11:40 2016 -0800
@@ -1,6 +1,6 @@
 
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -1284,24 +1284,6 @@
 compiler.note.unchecked.plural.additional=\
     Some input files additionally use unchecked or unsafe operations.
 
-# 0: file name
-compiler.note.sunapi.filename=\
-    {0} uses internal proprietary API that may be removed in a future release.
-
-compiler.note.sunapi.plural=\
-    Some input files use internal proprietary API that may be removed in a future release.
-
-# The following string may appear after one of the above sunapi messages.
-compiler.note.sunapi.recompile=\
-    Recompile with -Xlint:sunapi for details.
-
-# 0: file name
-compiler.note.sunapi.filename.additional=\
-    {0} uses additional internal proprietary API that may be removed in a future release.
-
-compiler.note.sunapi.plural.additional=\
-    Some input files additionally use internal proprietary API that may be removed in a future release.
-
 # Notes related to annotation processing
 
 # Print a client-generated note; assumed to be localized, no translation required
@@ -1375,13 +1357,6 @@
 compiler.misc.verbose.classpath=\
     [search path for class files: {0}]
 
-## extra output when using -checkclassfile (code/ClassReader)
-compiler.misc.ccf.found.later.version=\
-    class file has later version than expected: {0}
-
-compiler.misc.ccf.unrecognized.attribute=\
-    unrecognized attribute: {0}
-
 ## extra output when using -prompt (util/Log)
 compiler.misc.resume.abort=\
     R)esume, A)bort>
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -208,9 +208,6 @@
 javac.opt.Xlint.desc.static=\
     Warn about accessing a static member using an instance.
 
-javac.opt.Xlint.desc.sunapi=\
-    Warn about proprietary API that may be removed in a future release.
-
 javac.opt.Xlint.desc.try=\
     Warn about issues relating to use of try blocks (i.e. try-with-resources).
 
--- a/langtools/test/tools/javac/T6873845.java	Wed Feb 10 07:21:32 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 6873845
- * @summary refine access to symbol file
- * @modules java.base/sun.misc
- *          jdk.compiler
- */
-
-import java.io.*;
-import java.util.*;
-
-import sun.misc.*;
-
-public class T6873845 {
-    public static void main(String... args) throws Exception {
-        new T6873845().run();
-    }
-
-    public void run() throws Exception {
-        String out = compile(Arrays.asList("-XDrawDiagnostics", "-X"));
-        if (out.contains("sunapi"))
-            throw new Exception("unexpected output for -X");
-
-        String warn1 = "T6873845.java:75:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
-        String warn2 = "T6873845.java:80:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
-        String note1 = "- compiler.note.sunapi.filename: T6873845.java" + newline;
-        String note2 = "- compiler.note.sunapi.recompile" + newline;
-
-        test(opts(),
-                warn1 + warn2 + "2 warnings" + newline);
-        test(opts("-XDenableSunApiLintControl"),
-                note1 + note2);
-        test(opts("-XDenableSunApiLintControl", "-XDsuppressNotes"),
-                "");
-        test(opts("-XDenableSunApiLintControl", "-Xlint:sunapi"),
-                warn1 + "1 warning" + newline);
-        test(opts("-XDenableSunApiLintControl", "-Xlint:all"),
-                warn1 + "1 warning" + newline);
-        test(opts("-XDenableSunApiLintControl", "-Xlint:all,-sunapi"),
-                note1 + note2);
-    }
-
-    List<String> opts(String... opts) {
-        return Arrays.asList(opts);
-    }
-
-    void test(List<String> opts, String expect) throws Exception {
-        List<String> args = new ArrayList<String>();
-        args.addAll(opts);
-        args.add("-d");
-        args.add(testClasses.getPath());
-        args.add(new File(testSrc, "T6873845.java").getPath());
-        compile(args); // to verify resource strings exist
-        args.add(0, "-XDrawDiagnostics");
-        String out = compile(args);
-        if (!out.equals(expect))
-            throw new Exception("unexpected output from compiler; expected: " + expect +
-                    "\n  found: " + out);
-    }
-
-    String compile(List<String> args) throws Exception{
-        StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter(sw);
-        System.out.println("compile: " + args);
-        int rc = com.sun.tools.javac.Main.compile(args.toArray(new String[args.size()]), pw);
-        pw.close();
-        String out = sw.toString();
-        System.out.println(out);
-        if (rc != 0)
-            throw new Exception("compilation failed unexpectedly");
-        return out;
-    }
-
-    void m1() {
-        Unsafe.getUnsafe();
-    }
-
-    @SuppressWarnings("sunapi")
-    void m2() {
-        Unsafe.getUnsafe();
-    }
-
-    private File testSrc = new File(System.getProperty("test.src", "."));
-    private File testClasses = new File(System.getProperty("test.classes", "."));
-    private String newline = System.getProperty("line.separator");
-}
-
--- a/langtools/test/tools/javac/diags/CheckResourceKeys.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java	Wed Feb 10 15:11:40 2016 -0800
@@ -182,7 +182,7 @@
      * have a significant recognizable substring to look for.
      */
     private boolean isMandatoryWarningString(String s) {
-        String[] bases = { "deprecated", "unchecked", "varargs", "sunapi" };
+        String[] bases = { "deprecated", "unchecked", "varargs" };
         String[] tails = { ".filename", ".filename.additional", ".plural", ".plural.additional", ".recompile" };
         for (String b: bases) {
             if (s.startsWith(b)) {
@@ -229,7 +229,6 @@
         "compiler.err.signature.doesnt.match.supertype",    // UNUSED
         "compiler.err.type.var.more.than.once",             // UNUSED
         "compiler.err.type.var.more.than.once.in.result",   // UNUSED
-        "compiler.misc.ccf.found.later.version",            // UNUSED
         "compiler.misc.non.denotable.type",                 // UNUSED
         "compiler.misc.unnamed.package",                    // should be required, CR 6964147
         "compiler.misc.verbose.retro",                      // UNUSED
--- a/langtools/test/tools/javac/diags/examples.not-yet.txt	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/examples.not-yet.txt	Wed Feb 10 15:11:40 2016 -0800
@@ -49,8 +49,6 @@
 compiler.misc.bad.signature                             # bad class file
 compiler.misc.bad.type.annotation.value
 compiler.misc.base.membership                           # UNUSED
-compiler.misc.ccf.found.later.version
-compiler.misc.ccf.unrecognized.attribute
 compiler.misc.class.file.not.found                      # ClassReader
 compiler.misc.class.file.wrong.class
 compiler.misc.fatal.err.cant.locate.ctor                # Resolve, from Lower
--- a/langtools/test/tools/javac/diags/examples/SunApiFilename.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/examples/SunApiFilename.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,7 @@
  * questions.
  */
 
-// key: compiler.note.sunapi.filename
-// key: compiler.note.sunapi.recompile
-// options: -XDenableSunApiLintControl
+// key: compiler.warn.sun.proprietary
 
 class SunApiFilename {
     sun.misc.Unsafe x;
--- a/langtools/test/tools/javac/diags/examples/SunApiFilenameAdditional.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/examples/SunApiFilenameAdditional.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,7 @@
  * questions.
  */
 
-// key: compiler.note.sunapi.filename.additional
 // key: compiler.warn.sun.proprietary
-// options: -XDenableSunApiLintControl -Xlint:sunapi -Xmaxwarns 1
 
 class SunApiFilenameAdditional {
     sun.misc.Unsafe x1;
--- a/langtools/test/tools/javac/diags/examples/SunApiPlural/SunApiPlural.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/examples/SunApiPlural/SunApiPlural.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,7 @@
  * questions.
  */
 
-// key: compiler.note.sunapi.plural
-// key: compiler.note.sunapi.recompile
-// options: -XDenableSunApiLintControl
+// key: compiler.warn.sun.proprietary
 
 class SunApiPlural {
     sun.misc.Unsafe x;
--- a/langtools/test/tools/javac/diags/examples/SunApiPluralAdditional/SunApiPluralAdditional.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/diags/examples/SunApiPluralAdditional/SunApiPluralAdditional.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,7 @@
  * questions.
  */
 
-// key: compiler.note.sunapi.plural.additional
 // key: compiler.warn.sun.proprietary
-// options: -XDenableSunApiLintControl -Xlint:sunapi -Xmaxwarns 1
 
 class SunApiPluralAdditional {
     sun.misc.Unsafe x;
--- a/langtools/test/tools/javac/lambda/Conditional01.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/lambda/Conditional01.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8003280
  * @summary Add lambda tests
  *  conditional and varargs
- * @compile -XDcomplexinference Conditional01.java
+ * @compile Conditional01.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/lambda/Conditional02.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/lambda/Conditional02.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8003280
  * @summary Add lambda tests
  *  inference and conditionals
- * @compile -XDcomplexinference Conditional02.java
+ * @compile Conditional02.java
  */
 
 class Conditional02 {
--- a/langtools/test/tools/javac/lambda/Conditional03.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/lambda/Conditional03.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8003280
  * @summary Add lambda tests
  *  conditionals and boxing
- * @compile -XDcomplexinference Conditional03.java
+ * @compile Conditional03.java
  */
 
 class Conditional03 {
--- a/langtools/test/tools/javac/lambda/TargetType27.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/lambda/TargetType27.java	Wed Feb 10 15:11:40 2016 -0800
@@ -4,7 +4,7 @@
  * @summary Add lambda tests
  *  complex case of cyclic type inference (lambda returned where inference var expected)
  * @compile/fail/ref=TargetType27.out -XDrawDiagnostics TargetType27.java
- * @compile/fail/ref=TargetType27.out -XDrawDiagnostics -XDcomplexinference TargetType27.java
+ * @compile/fail/ref=TargetType27.out -XDrawDiagnostics TargetType27.java
  */
 
 class TargetType27 {
--- a/langtools/test/tools/javac/lambda/TargetType34.java	Wed Feb 10 07:21:32 2016 -0800
+++ b/langtools/test/tools/javac/lambda/TargetType34.java	Wed Feb 10 15:11:40 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8003280
  * @summary Add lambda tests
  *  spurious resolution diagnostics when diamond constructor contains poly expression
- * @compile -XDcomplexinference TargetType34.java
+ * @compile TargetType34.java
  */
 
 class TargetType34<X> {
--- a/langtools/test/tools/javac/warnings/6594914/T6594914b.java	Wed Feb 10 07:21:32 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/**
- * @test /nodynamiccopyright/
- * @bug 6594914
- * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
- * @modules java.base/sun.security.x509
- * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
- */
-
-
-class T6747671b {
-
-    sun.security.x509.X509CertInfo a1; //warn
-
-    @SuppressWarnings("sunapi")
-    sun.security.x509.X509CertInfo a2;
-
-    <X extends sun.security.x509.X509CertInfo>
-    sun.security.x509.X509CertInfo m1(sun.security.x509.X509CertInfo a)
-            throws sun.security.x509.CertException { return null; } //warn
-
-    @SuppressWarnings("sunapi")
-    <X extends sun.security.x509.X509CertInfo>
-    sun.security.x509.X509CertInfo m2(sun.security.x509.X509CertInfo a)
-            throws sun.security.x509.CertException { return null; }
-
-    void test() {
-        sun.security.x509.X509CertInfo a1; //warn
-
-        @SuppressWarnings("sunapi")
-        sun.security.x509.X509CertInfo a2;
-    }
-}