diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index a8e79f799286dbd4d19a819188e61d21ca6fa790..e9a423ffd9509472542ab057fd6593e48d2fc528 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -426,8 +426,8 @@ public class JavaCompiler { verboseCompilePolicy = options.isSet("verboseCompilePolicy"); - if (options.isSet("shouldstop.at") && - CompileState.valueOf(options.get("shouldstop.at")) == CompileState.ATTR) + if (options.isSet("should-stop.at") && + CompileState.valueOf(options.get("should-stop.at")) == CompileState.ATTR) compilePolicy = CompilePolicy.ATTR_ONLY; else compilePolicy = CompilePolicy.decode(options.get("compilePolicy")); @@ -440,14 +440,14 @@ public class JavaCompiler { : null; shouldStopPolicyIfError = - options.isSet("shouldstop.at") // backwards compatible - ? CompileState.valueOf(options.get("shouldstop.at")) - : options.isSet("shouldstop.ifError") - ? CompileState.valueOf(options.get("shouldstop.ifError")) + options.isSet("should-stop.at") // backwards compatible + ? CompileState.valueOf(options.get("should-stop.at")) + : options.isSet("should-stop.ifError") + ? CompileState.valueOf(options.get("should-stop.ifError")) : CompileState.INIT; shouldStopPolicyIfNoError = - options.isSet("shouldstop.ifNoError") - ? CompileState.valueOf(options.get("shouldstop.ifNoError")) + options.isSet("should-stop.ifNoError") + ? CompileState.valueOf(options.get("should-stop.ifNoError")) : CompileState.GENERATE; if (options.isUnset("diags.legacy")) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java index 6d39408b095c968b7e4143f25cfd2b5ec1568ab7..03327387b4736d2ecca710ab834e46a43d383107 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java @@ -509,33 +509,21 @@ public enum Option { XDIAGS("-Xdiags:", "opt.diags", EXTENDED, BASIC, ONEOF, "compact", "verbose"), - XDEBUG("-Xdebug:", null, HIDDEN, BASIC) { + DEBUG("--debug:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { - String p = option.substring(option.indexOf(':') + 1).trim(); - String[] subOptions = p.split(";"); - for (String subOption : subOptions) { - subOption = "debug." + subOption.trim(); - XD.process(helper, subOption, subOption); - } - return false; + return HiddenGroup.DEBUG.process(helper, option); } }, - XSHOULDSTOP("-Xshouldstop:", null, HIDDEN, BASIC) { + SHOULDSTOP("--should-stop:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { - String p = option.substring(option.indexOf(':') + 1).trim(); - String[] subOptions = p.split(";"); - for (String subOption : subOptions) { - subOption = "shouldstop." + subOption.trim(); - XD.process(helper, subOption, subOption); - } - return false; + return HiddenGroup.SHOULDSTOP.process(helper, option); } }, - DIAGS("-diags:", null, HIDDEN, BASIC) { + DIAGS("--diags:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { return HiddenGroup.DIAGS.process(helper, option); @@ -754,7 +742,12 @@ public enum Option { } enum HiddenGroup { - DIAGS("diags"); + DIAGS("diags"), + DEBUG("debug"), + SHOULDSTOP("should-stop"); + + static final Set skipSet = new java.util.HashSet<>( + Arrays.asList("--diags:", "--debug:", "--should-stop:")); final String text; @@ -771,6 +764,10 @@ public enum Option { } return false; } + + static boolean skip(String name) { + return skipSet.contains(name); + } } /** @@ -930,7 +927,7 @@ public enum Option { } private boolean matches(String option, String name) { - if (name.startsWith("--")) { + if (name.startsWith("--") && !HiddenGroup.skip(name)) { return option.equals(name) || hasArg() && option.startsWith(name + "="); } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java index a62999167092bca090c23f0c6f317bfc30fa8566..4f212a86a1986f13a74e56893204e09f2ddc1f38 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java @@ -313,7 +313,7 @@ public class Options { } // Enable dependency generation - args.add("-Xdebug:completionDeps=source,class"); + args.add("--debug:completionDeps=source,class"); // This can't be anything but 'none'. Enforced by sjavac main method. args.add("-implicit:" + implicitPolicy); diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java index 5712a2202fe975f66a744ab87fc5f7f8b1cde3e1..7b9d73c1a668688569fedf1676293f7469fe48d4 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java @@ -95,24 +95,6 @@ class ReplParser extends JavacParser { mods = modifiersOpt(); } - if (token.kind == PACKAGE) { - int packagePos = token.pos; - List annotations = List.nil(); - seenPackage = true; - if (mods != null) { - checkNoMods(mods.flags); - annotations = mods.annotations; - mods = null; - } - nextToken(); - JCExpression pid = qualident(false); - accept(SEMI); - JCPackageDecl pd = F.at(packagePos).PackageDecl(annotations, pid); - attach(pd, firstToken.comment(CommentStyle.JAVADOC)); - storeEnd(pd, token.pos); - defs.append(pd); - } - boolean firstTypeDecl = true; while (token.kind != EOF) { if (token.pos > 0 && token.pos <= endPosTable.errorEndPos) { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java index 090bfb6d969efe9549979dc0b202fb577a973ab4..309f4b4ba09e4f30114de168467d8e22ad5dcd20 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java @@ -838,8 +838,31 @@ class SourceCodeAnalysisImpl extends SourceCodeAnalysis { } private Stream localElements(Scope scope) { - @SuppressWarnings("unchecked") - Stream elements = Util.stream((Iterable)scope.getLocalElements()); + //workaround for: JDK-8024687 + Iterable elementsIt = () -> new Iterator() { + Iterator it = scope.getLocalElements().iterator(); + @Override + public boolean hasNext() { + while (true) { + try { + return it.hasNext(); + } catch (CompletionFailure cf) { + //ignore... + } + } + } + @Override + public Element next() { + while (true) { + try { + return it.next(); + } catch (CompletionFailure cf) { + //ignore... + } + } + } + }; + Stream elements = Util.stream(elementsIt); if (scope.getEnclosingScope() != null && scope.getEnclosingClass() != scope.getEnclosingScope().getEnclosingClass()) { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java index 191d43cc088ac25963c747eeae9aaaf709b69216..28ed2d2acb8a0fe5dd244827b06537aed2feb7da 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java @@ -222,7 +222,7 @@ class TaskFactory { this(wraps.stream(), new WrapSourceHandler(), Util.join(new String[] { - "-Xshouldstop:at=FLOW", "-Xlint:unchecked", + "--should-stop:at=FLOW", "-Xlint:unchecked", "-proc:none" }, extraArgs)); } diff --git a/langtools/test/jdk/jshell/CompletionSuggestionTest.java b/langtools/test/jdk/jshell/CompletionSuggestionTest.java index 8c2c723bc1e4dc93750a17c9ebdb2a08817585b3..b3a40be8e87b7f85a2b6b3ff399da9b587139dbc 100644 --- a/langtools/test/jdk/jshell/CompletionSuggestionTest.java +++ b/langtools/test/jdk/jshell/CompletionSuggestionTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8141092 8153761 + * @bug 8131025 8141092 8153761 * @summary Test Completion * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -610,4 +610,26 @@ public class CompletionSuggestionTest extends KullaTesting { keepParameterNames.setAccessible(true); keepParameterNames.set(getAnalysis(), new String[0]); } + + public void testBrokenClassFile2() throws IOException { + Path broken = outDir.resolve("broken"); + compiler.compile(broken, + "package p;\n" + + "public class BrokenA {\n" + + "}", + "package p.q;\n" + + "public class BrokenB {\n" + + "}", + "package p;\n" + + "public class BrokenC {\n" + + "}"); + Path cp = compiler.getPath(broken); + Path target = cp.resolve("p").resolve("BrokenB.class"); + Files.deleteIfExists(target); + Files.move(cp.resolve("p").resolve("q").resolve("BrokenB.class"), target); + addToClasspath(cp); + + assertEval("import p.*;"); + assertCompletion("Broke|", "BrokenA", "BrokenC"); + } } diff --git a/langtools/test/jdk/jshell/RejectedFailedTest.java b/langtools/test/jdk/jshell/RejectedFailedTest.java index b9d8bece7cb66d7169c2ff1c47bd85b475a8e439..5411d5d8aee182edeace0161ca3b459e32daa59a 100644 --- a/langtools/test/jdk/jshell/RejectedFailedTest.java +++ b/langtools/test/jdk/jshell/RejectedFailedTest.java @@ -22,7 +22,7 @@ */ /* - * @test + * @test 8080352 * @summary Tests for hard errors, like syntax errors * @build KullaTesting * @run testng RejectedFailedTest @@ -81,6 +81,7 @@ public class RejectedFailedTest extends KullaTesting { " a b c", ")", "class interface A", + "package foo;" }; checkByKind(inputsErroneous, Kind.ERRONEOUS); } diff --git a/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java b/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java index 728ddbda217f36bd62ebe8bced3420cd3b0ddce1..77bf387f7e775f4221e2dfdb0ce7d04c1766e468 100644 --- a/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java +++ b/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java @@ -28,7 +28,7 @@ * file are correct, including those within InnerClasses attributes. * @author John Rose (jrose). Entered as a regression test by Bill Maddox (maddox). * - * @compile/ref=ClassModifiers.out -Xdebug:dumpmodifiers=ci ClassModifiers.java + * @compile/ref=ClassModifiers.out --debug:dumpmodifiers=ci ClassModifiers.java * */ diff --git a/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java b/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java index b6697d0afa074db79d4383aba1acfbf7d6c3b183..fa134f816ae6c4b8ffce0b61e11efd088f4c8636 100644 --- a/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java +++ b/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java @@ -26,7 +26,7 @@ * @bug 4249112 4785453 * @summary Verify that implicit member modifiers are set correctly. * - * @compile/ref=MemberModifiers.out -Xdebug:dumpmodifiers=cfm MemberModifiers.java + * @compile/ref=MemberModifiers.out --debug:dumpmodifiers=cfm MemberModifiers.java */ // Currently, we check only that members of final classes are not final. diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java index 0d48df3d2a43bb6c27c2bf8b98454be70a288ebb..04008efcfb3efe5468f92bb52974731440c7e60d 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java @@ -3,8 +3,8 @@ * @bug 6722234 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars T6722234a.java - * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6722234a.java + * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars T6722234a.java + * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6722234a.java */ class T6722234a { diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java index 6c58f552b567f8e8ce181d768b4c0e51f89cc03e..47a1716cf2aebbcf5b1a479836b08edbc60c08db 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java @@ -3,8 +3,8 @@ * @bug 6722234 8078024 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics -diags:formatterOptions=simpleNames T6722234b.java - * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics -diags:formatterOptions=simpleNames,where T6722234b.java + * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234b.java + * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags:formatterOptions=simpleNames,where T6722234b.java */ import java.util.*; diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java index 443e53b921f8356618ea67e10e4c12a1f2045b86..4b12953003d9646d4c2b0a3a7b07b4d1887f7b73 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java @@ -3,7 +3,7 @@ * @bug 6722234 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234c.out -XDrawDiagnostics -diags:formatterOptions=simpleNames T6722234c.java + * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234c.java */ class T6722234c { diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java index 7cdcbf7c26f115f224d6a27c0289b76db7a00799..95fa4fb24ab6a257390a9884f2470d620be2a8b1 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java @@ -3,8 +3,8 @@ * @bug 6722234 8078024 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics -diags:formatterOptions=where T6722234d.java - * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics -diags:formatterOptions=where,simpleNames T6722234d.java + * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags:formatterOptions=where T6722234d.java + * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags:formatterOptions=where,simpleNames T6722234d.java */ class T6722234d { diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java index 2117363a939b35473bbc144e922c08787320510d..1713c05e202f49fb161936c7f48edf9f3f90e007 100644 --- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java @@ -3,7 +3,7 @@ * @bug 6862608 * @summary rich diagnostic sometimes contain wrong type variable numbering * @author mcimadamore - * @compile/fail/ref=T6862608a.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6862608a.java + * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608a.java */ diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java index 9889b3bc8c9c665aa2056407c62e41ee8b27ecea..14c61a3314261cfa056299981136c10b56231bd2 100644 --- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java @@ -3,7 +3,7 @@ * @bug 6862608 * @summary rich diagnostic sometimes contain wrong type variable numbering * @author mcimadamore - * @compile/fail/ref=T6862608b.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6862608b.java + * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608b.java */ class T66862608b { diff --git a/langtools/test/tools/javac/Diagnostics/7010608/Test.java b/langtools/test/tools/javac/Diagnostics/7010608/Test.java index 9265995685e68618ad439a4a93a9e6cf176079aa..332d26a0d9d33530bdcc61f98cfdd8387a0ec3c1 100644 --- a/langtools/test/tools/javac/Diagnostics/7010608/Test.java +++ b/langtools/test/tools/javac/Diagnostics/7010608/Test.java @@ -46,9 +46,9 @@ public class Test { try { test(Arrays.asList(), "myfo://test:1: error: cannot find symbol"); - test(Arrays.asList("-diags:layout=OLD"), + test(Arrays.asList("--diags:layout=OLD"), "myfo://test:1: cannot find symbol"); - test(Arrays.asList("-diags:legacy"), + test(Arrays.asList("--diags:legacy"), "myfo://test:1: cannot find symbol"); } finally { Locale.setDefault(prev); diff --git a/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java b/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java index 0ab5f0229c934bf04f45430ba25bd8cb9b63cae9..74a664cd160a30cb96339cc1ae2e7a24a1cb80b4 100644 --- a/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java +++ b/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8010387 * @summary rich diagnostic sometimes contain wrong type variable numbering - * @compile/fail/ref=T8010387.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T8010387.java + * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T8010387.java */ abstract class T8010387 { diff --git a/langtools/test/tools/javac/InterfaceMemberClassModifiers.java b/langtools/test/tools/javac/InterfaceMemberClassModifiers.java index 638cb731ff9c51cb0053b21b347c4e49d6a04cb3..bb5fd1367e68a627c4ff200fbf4416742a4a573c 100644 --- a/langtools/test/tools/javac/InterfaceMemberClassModifiers.java +++ b/langtools/test/tools/javac/InterfaceMemberClassModifiers.java @@ -4,7 +4,7 @@ * @summary Verify that invalid access modifiers on interface members don't cause crash. * @author maddox * - * @compile/fail/ref=InterfaceMemberClassModifiers.out -diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java + * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java */ public interface InterfaceMemberClassModifiers { diff --git a/langtools/test/tools/javac/T5003235/T5003235a.java b/langtools/test/tools/javac/T5003235/T5003235a.java index f30ad7a8ebf3ccad56e6bd1657797274842b0535..1eea9628b3be6b43c8b012cd0f453bd635367c00 100644 --- a/langtools/test/tools/javac/T5003235/T5003235a.java +++ b/langtools/test/tools/javac/T5003235/T5003235a.java @@ -3,7 +3,7 @@ * @bug 5003235 * @summary Private inner class accessible from subclasses * @author Peter von der Ah\u00e9 - * @compile/fail/ref=T5003235a.out -diags:layout=%b:%l:%_%m T5003235a.java + * @compile/fail/ref=T5003235a.out --diags:layout=%b:%l:%_%m T5003235a.java */ class Super { diff --git a/langtools/test/tools/javac/T5003235/T5003235b.java b/langtools/test/tools/javac/T5003235/T5003235b.java index 3384f909b6c1faff436e661c6e59783bcc102fc9..629e077dba576f72f36352540dced61b414eed60 100644 --- a/langtools/test/tools/javac/T5003235/T5003235b.java +++ b/langtools/test/tools/javac/T5003235/T5003235b.java @@ -3,7 +3,7 @@ * @bug 5003235 * @summary Accessibility of private inner class * @author Peter von der Ah\u00e9 - * @compile/fail/ref=T5003235b.out -diags:layout=%b:%l:%_%m T5003235b.java + * @compile/fail/ref=T5003235b.out --diags:layout=%b:%l:%_%m T5003235b.java */ class Outer { diff --git a/langtools/test/tools/javac/T6214885.java b/langtools/test/tools/javac/T6214885.java index 73fff2c10a948dd4f60402e59da75a40aef5730d..f79b752ecbc92353cc64a5c707a78330fc5e0ef0 100644 --- a/langtools/test/tools/javac/T6214885.java +++ b/langtools/test/tools/javac/T6214885.java @@ -2,8 +2,8 @@ * @test /nodynamiccopyright/ * @bug 6214885 * @summary This test exercises features provided by the new internal Diagnostics API - * @compile/fail/ref=T6214885a.out -diags:layout=%b:%l%_%t%m|%p%m T6214885.java - * @compile/fail/ref=T6214885b.out -diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java + * @compile/fail/ref=T6214885a.out --diags:layout=%b:%l%_%t%m|%p%m T6214885.java + * @compile/fail/ref=T6214885b.out --diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java */ class T6214885 { diff --git a/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java b/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java index 83707369e62858a4fa174337e31ff58d5d00e552..49fd4d46cf78016456128e153cadef1e49444736 100644 --- a/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java +++ b/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8026963 * @summary type annotations code crashes for lambdas with void argument - * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics -Xshouldstop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java + * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java */ public class TypeAnnotationsCrashWithErroneousTreeTest { diff --git a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java index 61809f98a2536550e50e473867c434a40424640d..263a145af38e2dac87df8bf31dc174d4cfd44e30 100644 --- a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java +++ b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java @@ -237,7 +237,7 @@ public class VerifyErroneousAnnotationsAttributed { JavacTask task = tool.getTask(null, fm, devNull, - Arrays.asList("-Xshouldstop:at=FLOW"), + Arrays.asList("--should-stop:at=FLOW"), null, Arrays.asList(new MyFileObject(code))); diff --git a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java index 0fae6e01d5d290812647bcbac79a9d069fc55ab3..bea25e934c8d6d8fa486a545b59eabc75807620b 100644 --- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java +++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java @@ -54,7 +54,7 @@ public class AfterMethodTypeParams { String test = TEMPLATE.replace("CONTENT", tc.snippet); List files = Arrays.asList(new MyFileObject(test)); StringWriter out = new StringWriter(); - List options = Arrays.asList("-XDrawDiagnostics", "-Xshouldstop:at=FLOW"); + List options = Arrays.asList("-XDrawDiagnostics", "--should-stop:at=FLOW"); JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files); new TreePathScanner() { diff --git a/langtools/test/tools/javac/api/6731573/T6731573.java b/langtools/test/tools/javac/api/6731573/T6731573.java index 141cc9d723466c9ec122d6ca907e10f5d5619e73..435e2b26f98ecf6ab99fafc815ab0b98c7358aab 100644 --- a/langtools/test/tools/javac/api/6731573/T6731573.java +++ b/langtools/test/tools/javac/api/6731573/T6731573.java @@ -62,8 +62,8 @@ public class T6731573 extends ToolTester { enum SourceLine { STANDARD(null), - ENABLED("-diags:showSource=true"), - DISABLED("-diags:showSource=false"); + ENABLED("--diags:showSource=true"), + DISABLED("--diags:showSource=false"); String optValue; diff --git a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java index 1b51e2af078dbb825de16db5c66937e164664110..b55053c7a81f077f6297d3f0d28137298a2e7612 100644 --- a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java +++ b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java @@ -63,11 +63,11 @@ public class EventsBalancedTest { test(null, Arrays.asList(b, a)); for (CompileState stop : CompileState.values()) { - test(Arrays.asList("-Xshouldstop:ifNoError=" + stop, - "-Xshouldstop:ifError=" + stop), + test(Arrays.asList("--should-stop:ifNoError=" + stop, + "--should-stop:ifError=" + stop), Arrays.asList(a, b)); - test(Arrays.asList("-Xshouldstop:ifNoError=" + stop, - "-Xshouldstop:ifError=" + stop), + test(Arrays.asList("--should-stop:ifNoError=" + stop, + "--should-stop:ifError=" + stop), Arrays.asList(b, a)); } } diff --git a/langtools/test/tools/javac/completionDeps/DepsAndAnno.java b/langtools/test/tools/javac/completionDeps/DepsAndAnno.java index 072010bc40ea225d55b8a4fd129973497404adb1..8ba7f54e18399f3edca2838045d1d924eb8c7d36 100644 --- a/langtools/test/tools/javac/completionDeps/DepsAndAnno.java +++ b/langtools/test/tools/javac/completionDeps/DepsAndAnno.java @@ -47,7 +47,7 @@ public class DepsAndAnno { public static void main(String[] args) { ToolBox toolBox = new ToolBox(); new JavacTask(toolBox, Task.Mode.CMDLINE) - .options("-Xdebug:completionDeps") + .options("--debug:completionDeps") .outdir(".") .files(ToolBox.testSrc + "/DepsAndAnno.java") .run(); diff --git a/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java b/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java index 86501ea091dd99d0f4f766a81c723d65ea778353..95912f01c52a66757276e5528dbe9c9a6a90c685 100644 --- a/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java +++ b/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java @@ -25,7 +25,7 @@ * @test * @bug 8078389 * @summary Make sure there is no interference between completionDeps and doclint - * @compile -Xdebug:completionDeps -Xdoclint DepsAndDocLint.java + * @compile --debug:completionDeps -Xdoclint DepsAndDocLint.java */ public class DepsAndDocLint { diff --git a/langtools/test/tools/javac/diags/CheckResourceKeys.java b/langtools/test/tools/javac/diags/CheckResourceKeys.java index dfd43d6e9c2790ef739374527fd582d0e01745f4..dde2681054b87e35356dfa757e0ffa515afa8719 100644 --- a/langtools/test/tools/javac/diags/CheckResourceKeys.java +++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java @@ -260,8 +260,8 @@ public class CheckResourceKeys { // ignore debug flag names if (cs.startsWith("debug.")) continue; - // ignore shouldstop flag names - if (cs.startsWith("shouldstop.")) + // ignore should-stop flag names + if (cs.startsWith("should-stop.")) continue; // ignore diagsformat flag names if (cs.startsWith("diags.")) diff --git a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java index 8eb43ad566a085cd3cb389337df89a5405b8ae53..bb324afa7902e8dbae5cc2920cd48314db86cd0b 100644 --- a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java +++ b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java @@ -23,7 +23,7 @@ // key: compiler.misc.applicable.method.found // key: compiler.note.verbose.resolve.multi -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class ApplicableMethodFound { diff --git a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java index 67e70c3423e58e8af15029b8afc288430d1448ef..5ecca3a329f8ec2d3229a5eb8b1b5ee2e5fd4b0c 100644 --- a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java +++ b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java @@ -24,7 +24,7 @@ // key: compiler.misc.applicable.method.found.1 // key: compiler.note.verbose.resolve.multi // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class ApplicableMethodFound1 { diff --git a/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java b/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java index f0c2c853dad45fbf42951cd2973cca535b2a3463..59bfd4c37f8e6446e4dfc25bceb2d8e94a4d4125 100644 --- a/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java +++ b/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java @@ -25,7 +25,7 @@ // key: compiler.note.verbose.resolve.multi // key: compiler.note.deferred.method.inst // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success,deferred-inference +// options: --debug:verboseResolution=applicable,success,deferred-inference class DeferredMethodInst { diff --git a/langtools/test/tools/javac/diags/examples/LambdaStat.java b/langtools/test/tools/javac/diags/examples/LambdaStat.java index a57b4e33778eadf358781cd0209dc17f93b22df8..c3ee38d6f8e9607da090b1119d52f752efa25611 100644 --- a/langtools/test/tools/javac/diags/examples/LambdaStat.java +++ b/langtools/test/tools/javac/diags/examples/LambdaStat.java @@ -22,7 +22,7 @@ */ // key: compiler.note.lambda.stat -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class LambdaStat { Runnable r = ()->{}; diff --git a/langtools/test/tools/javac/diags/examples/MrefStat.java b/langtools/test/tools/javac/diags/examples/MrefStat.java index 5d79977c1f139b8ca1bd45b368e4023b01c53a88..7f84baa8ca03ba60c05cb9a0a2f2c5c9e0c19879 100644 --- a/langtools/test/tools/javac/diags/examples/MrefStat.java +++ b/langtools/test/tools/javac/diags/examples/MrefStat.java @@ -22,7 +22,7 @@ */ // key: compiler.note.mref.stat -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class MrefStat { Runnable r = MrefStat::m; diff --git a/langtools/test/tools/javac/diags/examples/MrefStat1.java b/langtools/test/tools/javac/diags/examples/MrefStat1.java index b3128eedbe70b422c96c640eecdfaba21b63899a..c4bdf4cff2d7ba247bdd4b55a6a2dac184c862eb 100644 --- a/langtools/test/tools/javac/diags/examples/MrefStat1.java +++ b/langtools/test/tools/javac/diags/examples/MrefStat1.java @@ -22,7 +22,7 @@ */ // key: compiler.note.mref.stat.1 -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class MrefStat1 { diff --git a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java index edbaabe8c6e7f197e15f590b48f9299148d98a3e..dc199bc3e38acf9b3c391a193bc2a0d2a22acf09 100644 --- a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java +++ b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java @@ -26,7 +26,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -Xdebug:verboseResolution=inapplicable,failure +// options: --debug:verboseResolution=inapplicable,failure class NotApplicableMethodFound { diff --git a/langtools/test/tools/javac/diags/examples/PartialInstSig.java b/langtools/test/tools/javac/diags/examples/PartialInstSig.java index e2a9c8e0aa06410abcc955662f082d8eae539302..4a56058856fa04eb0be86dd907a90537dfac42be 100644 --- a/langtools/test/tools/javac/diags/examples/PartialInstSig.java +++ b/langtools/test/tools/javac/diags/examples/PartialInstSig.java @@ -24,7 +24,7 @@ // key: compiler.misc.applicable.method.found.1 // key: compiler.note.verbose.resolve.multi // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class PartialInstSig { diff --git a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java index 40108785d0e35293cc778cba8378ab18ccdaecc5..c097c74085ac59eefd69d1503e37109d17a226ac 100644 --- a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java +++ b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java @@ -23,7 +23,7 @@ // key: compiler.misc.applicable.method.found // key: compiler.note.verbose.resolve.multi -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class VerboseResolveMulti { diff --git a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java index d9a5b8bcc3e1bb86c8bb582c070d1e886db12d39..33e7a2deef40c33490c033b45c7f8783ed3ed78a 100644 --- a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java +++ b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java @@ -26,7 +26,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -Xdebug:verboseResolution=inapplicable,failure +// options: --debug:verboseResolution=inapplicable,failure class VerboseResolveMulti1 { diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured.java b/langtools/test/tools/javac/diags/examples/WhereCaptured.java index 5ea17aea1edf858685217dbc7b7442d9f6fa922e..22fc86530dd719f2053d6b028f39310bbd13d79e 100644 --- a/langtools/test/tools/javac/diags/examples/WhereCaptured.java +++ b/langtools/test/tools/javac/diags/examples/WhereCaptured.java @@ -28,7 +28,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.incompatible.eq.bounds // key: compiler.misc.captured.type -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java index f5ce62e21880c97dc9c27cc4a248961254a0b78d..26fdf3e8f5ba110094fdd4aa7d7e7627ba1b2bff 100644 --- a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java +++ b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java @@ -29,7 +29,7 @@ // key: compiler.misc.incompatible.eq.bounds // key: compiler.misc.captured.type // key: compiler.misc.type.null -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java b/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java index eb894a9f2cbf46af1e8208e10b82f482a38af85a..fb060c89c1e0b2399e778549212636f93c03b2ab 100644 --- a/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java +++ b/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java @@ -25,7 +25,7 @@ // key: compiler.misc.where.description.typevar // key: compiler.err.prob.found.req // key: compiler.misc.inconvertible.types -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereIntersection.java b/langtools/test/tools/javac/diags/examples/WhereIntersection.java index 8b8a6fbd6122f106aae8ce9d8c57c2eb5153f03a..beec1d7cd6ec662bf92bb3ebb93b323c2bf214c3 100644 --- a/langtools/test/tools/javac/diags/examples/WhereIntersection.java +++ b/langtools/test/tools/javac/diags/examples/WhereIntersection.java @@ -26,7 +26,7 @@ // key: compiler.misc.where.description.intersection.1 // key: compiler.misc.where.intersection // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereIntersection { diff --git a/langtools/test/tools/javac/diags/examples/WhereIntersection2.java b/langtools/test/tools/javac/diags/examples/WhereIntersection2.java index 6850627db88c8d2197aecd190949f342f3eefe8c..91cab029c46895f89833b4f5f3711ba3194c4636 100644 --- a/langtools/test/tools/javac/diags/examples/WhereIntersection2.java +++ b/langtools/test/tools/javac/diags/examples/WhereIntersection2.java @@ -29,7 +29,7 @@ // key: compiler.misc.where.description.intersection // key: compiler.misc.where.intersection // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereIntersection2 { diff --git a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java index 9adca945a28a03f256662da8f782c1780112bb36..55097a8ce6a5ea93cdeb61ab1258ca6f6992740f 100644 --- a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java +++ b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java @@ -27,7 +27,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -diags:formatterOptions=where,disambiguateTvars +// options: --diags:formatterOptions=where,disambiguateTvars // run: simple class WhereTypeVar { diff --git a/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java b/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java index 41341f6827507cd04a7ad24487fd6f55b3997278..1f6f51b9431fccd0abf74f1e1c0ed6b08d0d718c 100644 --- a/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java +++ b/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java @@ -25,7 +25,7 @@ // key: compiler.misc.where.description.typevar // key: compiler.misc.where.typevar // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereTypeVar2 { diff --git a/langtools/test/tools/javac/failover/CheckAttributedTree.java b/langtools/test/tools/javac/failover/CheckAttributedTree.java index b9bb22bac2d7a7c3098c4dd76facf7792c3c406f..6c2d2cbc60d0c31e60156859b270dd43a0f4f98a 100644 --- a/langtools/test/tools/javac/failover/CheckAttributedTree.java +++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java @@ -311,7 +311,7 @@ public class CheckAttributedTree { final List trees = new ArrayList<>(); Iterable elems = newCompilationTask() .withWriter(pw) - .withOption("-Xshouldstop:at=ATTR") + .withOption("--should-stop:at=ATTR") .withOption("-XDverboseCompilePolicy") .withSource(files.iterator().next()) .withListener(new TaskListener() { diff --git a/langtools/test/tools/javac/failover/FailOver01.java b/langtools/test/tools/javac/failover/FailOver01.java index 473adfd4759ad757402b0021ddf55434a9fd03be..e8d4da792729e132a23d059f89cd74d225c9e91d 100644 --- a/langtools/test/tools/javac/failover/FailOver01.java +++ b/langtools/test/tools/javac/failover/FailOver01.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver01.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver01.java + * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver01.java */ class Test { { x = "" } } diff --git a/langtools/test/tools/javac/failover/FailOver02.java b/langtools/test/tools/javac/failover/FailOver02.java index 75c44665418e35d85ae389ce9d6d44e5ee54f7d9..0aac6fa4546d35ce99d129f297e492c3146700b3 100644 --- a/langtools/test/tools/javac/failover/FailOver02.java +++ b/langtools/test/tools/javac/failover/FailOver02.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver02.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver02.java + * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver02.java */ class Test implements AutoCloseable { diff --git a/langtools/test/tools/javac/failover/FailOver03.java b/langtools/test/tools/javac/failover/FailOver03.java index 268f8acd044e7d146e126c75b34d55c7d598ca84..cdfe3a8d81c39f354148b668fa38c3453d8fef4c 100644 --- a/langtools/test/tools/javac/failover/FailOver03.java +++ b/langtools/test/tools/javac/failover/FailOver03.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver03.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver03.java + * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver03.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver04.java b/langtools/test/tools/javac/failover/FailOver04.java index e8b72ddd521ef56f0dba0a4cbb3726498dc5ef0d..e9a723d1a196bc6f066dc8d756eb0312789808a3 100644 --- a/langtools/test/tools/javac/failover/FailOver04.java +++ b/langtools/test/tools/javac/failover/FailOver04.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver04.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver04.java + * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver04.java */ class Test { diff --git a/langtools/test/tools/javac/failover/FailOver05.java b/langtools/test/tools/javac/failover/FailOver05.java index 5209373272abf0f73b1c9c5bd63fd12632612f70..cbbbc222b7c36a247436f65d47212761ff7a13bd 100644 --- a/langtools/test/tools/javac/failover/FailOver05.java +++ b/langtools/test/tools/javac/failover/FailOver05.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver05.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver05.java + * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver05.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver06.java b/langtools/test/tools/javac/failover/FailOver06.java index fb28274cde71e63a9daff1f872035a66b6e0e971..14f7fa34f97f5fee48af422bca03f46a4da0be9b 100644 --- a/langtools/test/tools/javac/failover/FailOver06.java +++ b/langtools/test/tools/javac/failover/FailOver06.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver06.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver06.java + * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver06.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver07.java b/langtools/test/tools/javac/failover/FailOver07.java index 216c462d50ae37c1cbe8125dccab5ae53895d98d..a73037a0e9977224a691c96a0bd7177c08b5eba4 100644 --- a/langtools/test/tools/javac/failover/FailOver07.java +++ b/langtools/test/tools/javac/failover/FailOver07.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver07.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver07.java + * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver07.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver08.java b/langtools/test/tools/javac/failover/FailOver08.java index e993f3dee093c6e9b455772eb2f442cd56410bcf..d2446ae59af033ad349da44a332513fb215cfa0d 100644 --- a/langtools/test/tools/javac/failover/FailOver08.java +++ b/langtools/test/tools/javac/failover/FailOver08.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver08.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver08.java + * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver08.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver09.java b/langtools/test/tools/javac/failover/FailOver09.java index ca4976895fb769d1598c003f276a4b847d99d1a1..bc126e140f6f89efd46e1aa2e6e5a3eedcc31fd5 100644 --- a/langtools/test/tools/javac/failover/FailOver09.java +++ b/langtools/test/tools/javac/failover/FailOver09.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver09.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver09.java + * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver09.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver10.java b/langtools/test/tools/javac/failover/FailOver10.java index 2265de5744274e51f748c1388dc8106d76fa1bcc..5d32c85437d4b4e18b4f6194f4fa47be300f1292 100644 --- a/langtools/test/tools/javac/failover/FailOver10.java +++ b/langtools/test/tools/javac/failover/FailOver10.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver10.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver10.java + * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver10.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver11.java b/langtools/test/tools/javac/failover/FailOver11.java index aaad28007472247095f803f84f51f1d1a402d8e9..863053982bcd75f326545dd74c14dba73d0f65a5 100644 --- a/langtools/test/tools/javac/failover/FailOver11.java +++ b/langtools/test/tools/javac/failover/FailOver11.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver11.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver11.java + * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver11.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver12.java b/langtools/test/tools/javac/failover/FailOver12.java index da1e126ffeb985b0d92d939b81cdcedb265bb6e4..ed8699e039c18ca69cd1b43adaff9bd444141944 100644 --- a/langtools/test/tools/javac/failover/FailOver12.java +++ b/langtools/test/tools/javac/failover/FailOver12.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver12.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver12.java + * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver12.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver13.java b/langtools/test/tools/javac/failover/FailOver13.java index 03cf4259011da422ddff4005df4cd77c905680f3..f85249d0833f3ca1cbc7f1f2b0344acaf78bc6ba 100644 --- a/langtools/test/tools/javac/failover/FailOver13.java +++ b/langtools/test/tools/javac/failover/FailOver13.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver13.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver13.java + * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver13.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver14.java b/langtools/test/tools/javac/failover/FailOver14.java index 6f24ff3e558014ce6915a2d09e658936c0dc8d16..c0d3ab78abd6cdb4eef2a24fc11125b87045b8ff 100644 --- a/langtools/test/tools/javac/failover/FailOver14.java +++ b/langtools/test/tools/javac/failover/FailOver14.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver14.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver14.java + * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver14.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver15.java b/langtools/test/tools/javac/failover/FailOver15.java index 6fe5e5ae4856b87505f6a48b50a6642e788c488f..619cfd3a5acb28d2a612876b62888b4f96faae7d 100644 --- a/langtools/test/tools/javac/failover/FailOver15.java +++ b/langtools/test/tools/javac/failover/FailOver15.java @@ -3,7 +3,7 @@ * @bug 6970584 7060926 * @summary Attr.PostAttrAnalyzer misses a case * - * @compile/fail/ref=FailOver15.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver15.java + * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver15.java */ class Test { diff --git a/langtools/test/tools/javac/generics/inference/8158355/T8158355.java b/langtools/test/tools/javac/generics/inference/8158355/T8158355.java index a123a33ab914da4b04ee6cda2ab662a13b484e83..edc6fe9525469a4eb89ecb88334b3c65697e0d6f 100644 --- a/langtools/test/tools/javac/generics/inference/8158355/T8158355.java +++ b/langtools/test/tools/javac/generics/inference/8158355/T8158355.java @@ -27,7 +27,7 @@ * @test * @bug 8158355 * @summary Inference graph dot support broken - * @compile -Xdebug:dumpInferenceGraphsTo=. T8158355.java + * @compile --debug:dumpInferenceGraphsTo=. T8158355.java */ import java.util.List; diff --git a/langtools/test/tools/javac/lambda/MostSpecific09.java b/langtools/test/tools/javac/lambda/MostSpecific09.java index 311af8d7b1a40d55331f6b14b625a30922aaabce..82e12d698390895ae6250602c52607d905d06872 100644 --- a/langtools/test/tools/javac/lambda/MostSpecific09.java +++ b/langtools/test/tools/javac/lambda/MostSpecific09.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8029718 * @summary Should always use lambda body structure to disambiguate overload resolution - * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics -Xshouldstop:at=ATTR -Xdebug:verboseResolution=applicable,success MostSpecific09.java + * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop:at=ATTR --debug:verboseResolution=applicable,success MostSpecific09.java */ class MostSpecific09 { diff --git a/langtools/test/tools/javac/lambda/MostSpecific09.out b/langtools/test/tools/javac/lambda/MostSpecific09.out index 75330535ba08ff59905092a6c48f1c1e1ea0884d..5359cb7f3bfcdb7277f310230c0c98f037c4305e 100644 --- a/langtools/test/tools/javac/lambda/MostSpecific09.out +++ b/langtools/test/tools/javac/lambda/MostSpecific09.out @@ -3,7 +3,7 @@ MostSpecific09.java:26:9: compiler.note.verbose.resolve.multi: foo, MostSpecific MostSpecific09.java:27:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.J), null)} MostSpecific09.java:27:32: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:28:13: compiler.err.lambda.body.neither.value.nor.void.compatible -MostSpecific09.java:28:9: compiler.err.cant.apply.symbols: kindname.method, foo, @681,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} +MostSpecific09.java:28:9: compiler.err.cant.apply.symbols: kindname.method, foo, @682,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} MostSpecific09.java:28:43: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:29:9: compiler.err.ref.ambiguous: foo, kindname.method, foo(MostSpecific09.I), MostSpecific09, kindname.method, foo(MostSpecific09.J), MostSpecific09 MostSpecific09.java:29:28: compiler.note.verbose.resolve.multi: , java.lang.RuntimeException, 0, BASIC, compiler.misc.no.args, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, java.lang.RuntimeException(), null)} @@ -11,7 +11,7 @@ MostSpecific09.java:30:9: compiler.err.ref.ambiguous: foo, kindname.method, foo( MostSpecific09.java:32:9: compiler.err.ref.ambiguous: foo, kindname.method, foo(MostSpecific09.I), MostSpecific09, kindname.method, foo(MostSpecific09.J), MostSpecific09 MostSpecific09.java:33:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.I), null)} MostSpecific09.java:42:13: compiler.err.lambda.body.neither.value.nor.void.compatible -MostSpecific09.java:42:9: compiler.err.cant.apply.symbols: kindname.method, foo, @1130,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} +MostSpecific09.java:42:9: compiler.err.cant.apply.symbols: kindname.method, foo, @1131,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} MostSpecific09.java:46:23: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:49:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.J), null)} MostSpecific09.java:56:25: compiler.note.verbose.resolve.multi: , Bar, 0, BASIC, compiler.misc.no.args, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, Bar(), null)} diff --git a/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java b/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java index b7d2e0f9f6d6d6377fb80fbf3f0c8e2337289773..6546f3ddf2664ee70fe3f97c58c3c71ad52d0477 100644 --- a/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java +++ b/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java @@ -122,7 +122,7 @@ public class TestLambdaToMethodStats extends ComboInstance sources = new ArrayList<>(); sources.add(src); diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java index 0963135bf37d50a06cd40b372df0ad0ff3913741..5910eaa73c4b4f459a463d78525a517c143dc393 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess2.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java + * @compile/fail/ref=ProtectedMemberAccess2.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java */ // 71 errors expected. diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java index eacc53e8280824d5e342685be8988509f1d6920e..82b8d1b51a1daa0e41c3d3edc30235d85ca3f090 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess3.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java + * @compile/fail/ref=ProtectedMemberAccess3.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java */ // 46 errors expected. diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java index 695ccf46b29a5596244d712e8c1b3f269ba7d334..d8a558135248d4e5ccb89a6e5eb324ab50faa5f4 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess4.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java + * @compile/fail/ref=ProtectedMemberAccess4.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java */ // 33 errors expected. diff --git a/langtools/test/tools/javac/resolve/ResolveHarness.java b/langtools/test/tools/javac/resolve/ResolveHarness.java index 099fa4989ef6a937b1201d989ad228563af3e420..8de0a6b24327603224add7ab062f86bba5bcf8e2 100644 --- a/langtools/test/tools/javac/resolve/ResolveHarness.java +++ b/langtools/test/tools/javac/resolve/ResolveHarness.java @@ -132,8 +132,8 @@ public class ResolveHarness implements javax.tools.DiagnosticListener