changeset 39601:5b37e511ae4b

8161020: javac, fold stop compilation options Reviewed-by: mcimadamore
author vromero
date Mon, 11 Jul 2016 15:27:52 -0700
parents 83ea7c12c164
children bf58ed488873 9d1eafbf29c6
files langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java langtools/test/tools/javac/diags/CheckResourceKeys.java langtools/test/tools/javac/failover/CheckAttributedTree.java langtools/test/tools/javac/failover/FailOver01.java langtools/test/tools/javac/failover/FailOver02.java langtools/test/tools/javac/failover/FailOver03.java langtools/test/tools/javac/failover/FailOver04.java langtools/test/tools/javac/failover/FailOver05.java langtools/test/tools/javac/failover/FailOver06.java langtools/test/tools/javac/failover/FailOver07.java langtools/test/tools/javac/failover/FailOver08.java langtools/test/tools/javac/failover/FailOver09.java langtools/test/tools/javac/failover/FailOver10.java langtools/test/tools/javac/failover/FailOver11.java langtools/test/tools/javac/failover/FailOver12.java langtools/test/tools/javac/failover/FailOver13.java langtools/test/tools/javac/failover/FailOver14.java langtools/test/tools/javac/failover/FailOver15.java langtools/test/tools/javac/lambda/MostSpecific09.java langtools/test/tools/javac/lambda/MostSpecific09.out langtools/test/tools/javac/modules/AddLimitMods.java langtools/test/tools/javac/policy/test3/Test.java langtools/test/tools/javac/positions/TreeEndPosTest.java langtools/test/tools/javac/resolve/ResolveHarness.java
diffstat 30 files changed, 67 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Jul 11 15:27:52 2016 -0700
@@ -425,8 +425,8 @@
 
         verboseCompilePolicy = options.isSet("verboseCompilePolicy");
 
-        if (options.isSet("shouldStopPolicy") &&
-            CompileState.valueOf(options.get("shouldStopPolicy")) == CompileState.ATTR)
+        if (options.isSet("shouldstop.at") &&
+            CompileState.valueOf(options.get("shouldstop.at")) == CompileState.ATTR)
             compilePolicy = CompilePolicy.ATTR_ONLY;
         else
             compilePolicy = CompilePolicy.decode(options.get("compilePolicy"));
@@ -439,14 +439,14 @@
             : null;
 
         shouldStopPolicyIfError =
-            options.isSet("shouldStopPolicy") // backwards compatible
-            ? CompileState.valueOf(options.get("shouldStopPolicy"))
-            : options.isSet("shouldStopPolicyIfError")
-            ? CompileState.valueOf(options.get("shouldStopPolicyIfError"))
+            options.isSet("shouldstop.at") // backwards compatible
+            ? CompileState.valueOf(options.get("shouldstop.at"))
+            : options.isSet("shouldstop.ifError")
+            ? CompileState.valueOf(options.get("shouldstop.ifError"))
             : CompileState.INIT;
         shouldStopPolicyIfNoError =
-            options.isSet("shouldStopPolicyIfNoError")
-            ? CompileState.valueOf(options.get("shouldStopPolicyIfNoError"))
+            options.isSet("shouldstop.ifNoError")
+            ? CompileState.valueOf(options.get("shouldstop.ifNoError"))
             : CompileState.GENERATE;
 
         if (options.isUnset("oldDiags"))
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Mon Jul 11 15:27:52 2016 -0700
@@ -543,6 +543,19 @@
         }
     },
 
+    XSHOULDSTOP("-Xshouldstop:", 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;
+        }
+    },
+
     XADDEXPORTS("-XaddExports:", "opt.arg.addExports", "opt.addExports", EXTENDED, BASIC) {
         @Override
         public boolean process(OptionHelper helper, String option) {
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Mon Jul 11 15:27:52 2016 -0700
@@ -222,7 +222,7 @@
             this(wraps.stream(),
                     new WrapSourceHandler(),
                     Util.join(new String[] {
-                        "-XDshouldStopPolicy=FLOW", "-Xlint:unchecked",
+                        "-Xshouldstop:at=FLOW", "-Xlint:unchecked",
                         "-XaddExports:jdk.jshell/jdk.internal.jshell.remote=ALL-UNNAMED",
                         "-proc:none"
                     }, extraArgs));
--- a/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Mon Jul 11 15:27:52 2016 -0700
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8026963
  * @summary type annotations code crashes for lambdas with void argument
- * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
+ * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics -Xshouldstop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
  */
 
 public class TypeAnnotationsCrashWithErroneousTreeTest {
--- a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Mon Jul 11 15:27:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -237,7 +237,7 @@
         JavacTask task = tool.getTask(null,
                                       fm,
                                       devNull,
-                                      Arrays.asList("-XDshouldStopPolicy=FLOW"),
+                                      Arrays.asList("-Xshouldstop:at=FLOW"),
                                       null,
                                       Arrays.asList(new MyFileObject(code)));
 
--- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Mon Jul 11 15:27:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -54,7 +54,7 @@
             String test = TEMPLATE.replace("CONTENT", tc.snippet);
             List<JavaFileObject> files = Arrays.asList(new MyFileObject(test));
             StringWriter out = new StringWriter();
-            List<String> options = Arrays.asList("-XDrawDiagnostics", "-XDshouldStopPolicy=FLOW");
+            List<String> options = Arrays.asList("-XDrawDiagnostics", "-Xshouldstop:at=FLOW");
             JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files);
 
             new TreePathScanner<Void, Void>() {
--- a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java	Mon Jul 11 15:27:52 2016 -0700
@@ -63,11 +63,11 @@
         test(null, Arrays.asList(b, a));
 
         for (CompileState stop : CompileState.values()) {
-            test(Arrays.asList("-XDshouldStopPolicyIfNoError=" + stop,
-                               "-XDshouldStopPolicyIfError=" + stop),
+            test(Arrays.asList("-Xshouldstop:ifNoError=" + stop,
+                               "-Xshouldstop:ifError=" + stop),
                  Arrays.asList(a, b));
-            test(Arrays.asList("-XDshouldStopPolicyIfNoError=" + stop,
-                               "-XDshouldStopPolicyIfError=" + stop),
+            test(Arrays.asList("-Xshouldstop:ifNoError=" + stop,
+                               "-Xshouldstop:ifError=" + stop),
                  Arrays.asList(b, a));
         }
     }
--- a/langtools/test/tools/javac/diags/CheckResourceKeys.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java	Mon Jul 11 15:27:52 2016 -0700
@@ -260,6 +260,9 @@
                 // ignore debug flag names
                 if (cs.startsWith("debug."))
                     continue;
+                // ignore shouldstop flag names
+                if (cs.startsWith("shouldstop."))
+                    continue;
                 // explicit known exceptions
                 if (noResourceRequired.contains(cs))
                     continue;
--- a/langtools/test/tools/javac/failover/CheckAttributedTree.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java	Mon Jul 11 15:27:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, 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
@@ -311,7 +311,7 @@
                 final List<CompilationUnitTree> trees = new ArrayList<>();
                 Iterable<? extends Element> elems = newCompilationTask()
                     .withWriter(pw)
-                        .withOption("-XDshouldStopPolicy=ATTR")
+                        .withOption("-Xshouldstop:at=ATTR")
                         .withOption("-XDverboseCompilePolicy")
                         .withSource(files.iterator().next())
                         .withListener(new TaskListener() {
--- a/langtools/test/tools/javac/failover/FailOver01.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver01.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver01.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver01.java
+ * @compile/fail/ref=FailOver01.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver01.java
  */
 
 class Test { { x = "" } }
--- a/langtools/test/tools/javac/failover/FailOver02.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver02.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver02.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver02.java
+ * @compile/fail/ref=FailOver02.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver02.java
  */
 
 class Test implements AutoCloseable {
--- a/langtools/test/tools/javac/failover/FailOver03.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver03.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver03.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver03.java
+ * @compile/fail/ref=FailOver03.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver03.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver04.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver04.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver04.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver04.java
+ * @compile/fail/ref=FailOver04.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver04.java
  */
 
 class Test {
--- a/langtools/test/tools/javac/failover/FailOver05.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver05.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver05.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver05.java
+ * @compile/fail/ref=FailOver05.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver05.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver06.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver06.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver06.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver06.java
+ * @compile/fail/ref=FailOver06.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver06.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver07.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver07.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver07.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver07.java
+ * @compile/fail/ref=FailOver07.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver07.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver08.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver08.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver08.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver08.java
+ * @compile/fail/ref=FailOver08.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver08.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver09.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver09.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver09.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver09.java
+ * @compile/fail/ref=FailOver09.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver09.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver10.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver10.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver10.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver10.java
+ * @compile/fail/ref=FailOver10.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver10.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver11.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver11.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver11.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver11.java
+ * @compile/fail/ref=FailOver11.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver11.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver12.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver12.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver12.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver12.java
+ * @compile/fail/ref=FailOver12.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver12.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver13.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver13.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver13.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver13.java
+ * @compile/fail/ref=FailOver13.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver13.java
  */
 
 class Test extends Test {
--- a/langtools/test/tools/javac/failover/FailOver14.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver14.java	Mon Jul 11 15:27:52 2016 -0700
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver14.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver14.java
+ * @compile/fail/ref=FailOver14.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver14.java
  */
 
 class Test extends Test  {
--- a/langtools/test/tools/javac/failover/FailOver15.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/failover/FailOver15.java	Mon Jul 11 15:27:52 2016 -0700
@@ -3,7 +3,7 @@
  * @bug 6970584 7060926
  * @summary Attr.PostAttrAnalyzer misses a case
  *
- * @compile/fail/ref=FailOver15.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW -XDdev FailOver15.java
+ * @compile/fail/ref=FailOver15.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver15.java
  */
 
 class Test {
--- a/langtools/test/tools/javac/lambda/MostSpecific09.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/lambda/MostSpecific09.java	Mon Jul 11 15:27:52 2016 -0700
@@ -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 -XDshouldStopPolicy=ATTR -Xdebug:verboseResolution=applicable,success MostSpecific09.java
+ * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics -Xshouldstop:at=ATTR -Xdebug:verboseResolution=applicable,success MostSpecific09.java
  */
 
 class MostSpecific09 {
--- a/langtools/test/tools/javac/lambda/MostSpecific09.out	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/lambda/MostSpecific09.out	Mon Jul 11 15:27:52 2016 -0700
@@ -3,7 +3,7 @@
 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, @685,{(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, @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: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: <init>, 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: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, @1134,{(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, @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: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: <init>, Bar, 0, BASIC, compiler.misc.no.args, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, Bar(), null)}
--- a/langtools/test/tools/javac/modules/AddLimitMods.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/modules/AddLimitMods.java	Mon Jul 11 15:27:52 2016 -0700
@@ -119,7 +119,7 @@
         //real test
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "java.base")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -128,7 +128,7 @@
 
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "java.base",
                          "-addmods", "m2")
                 .outdir(modulePath)
@@ -138,7 +138,7 @@
 
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "java.base",
                          "-addmods", "m2,m3")
                 .outdir(modulePath)
@@ -148,7 +148,7 @@
 
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "m2")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -157,7 +157,7 @@
 
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "m3")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -166,7 +166,7 @@
 
         new JavacTask(tb)
                 .options("-modulepath", modulePath.toString(),
-                         "-XDshouldStopPolicyIfNoError=FLOW",
+                         "-Xshouldstop:ifNoError=FLOW",
                          "-limitmods", "m3",
                          "-addmods", "m2")
                 .outdir(modulePath)
@@ -473,7 +473,7 @@
                                            auxOptions,
                                            "-modulepath", modulePath.toString(),
                                            "-classpath", classpathOut.toString(),
-                                           "-XDshouldStopPolicyIfNoError=FLOW"))
+                                           "-Xshouldstop:ifNoError=FLOW"))
                    .outdir(modulePath)
                    .files(findJavaFiles(m2))
                    .run(success ? Task.Expect.SUCCESS : Task.Expect.FAIL)
--- a/langtools/test/tools/javac/policy/test3/Test.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/policy/test3/Test.java	Mon Jul 11 15:27:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -30,7 +30,7 @@
 import java.io.*;
 import java.util.*;
 
-// Simple test of -XDshouldStopPolicy.
+// Simple test of -Xshouldstop:at.
 // For each of the permissable values, we compile a file with an error in it,
 // then using -XDverboseCompilePolicy we check that the compilation gets as
 // far as expected, but no further.
@@ -83,7 +83,7 @@
         args.add("-d");
         args.add(".");
         if (ssp.needOption)
-            args.add("-XDshouldStopPolicy=" + ssp);
+            args.add("-Xshouldstop:at=" + ssp);
         args.add(new File(System.getProperty("test.src", "."), "A.java").getPath());
 
         StringWriter sw = new StringWriter();
--- a/langtools/test/tools/javac/positions/TreeEndPosTest.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/positions/TreeEndPosTest.java	Mon Jul 11 15:27:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -145,7 +145,7 @@
             options.add(tempDir.getPath());
             options.add("-d");
             options.add(tempDir.getPath());
-            options.add("-XDshouldStopPolicy=GENERATE");
+            options.add("-Xshouldstop:at=GENERATE");
 
             List<JavaFileObject> sources = new ArrayList<>();
             sources.add(src);
--- a/langtools/test/tools/javac/resolve/ResolveHarness.java	Mon Jul 11 18:13:42 2016 +0530
+++ b/langtools/test/tools/javac/resolve/ResolveHarness.java	Mon Jul 11 15:27:52 2016 -0700
@@ -132,7 +132,7 @@
 
     protected void check() throws Exception {
         String[] options = {
-            "-XDshouldStopPolicy=ATTR",
+            "-Xshouldstop:at=ATTR",
             "-Xdebug:verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
         };