8161020: javac, fold stop compilation options

Reviewed-by: mcimadamore
This commit is contained in:
Vicente Romero 2016-07-11 15:27:52 -07:00
parent 0917774834
commit a7cc024b53
30 changed files with 67 additions and 51 deletions

View file

@ -425,8 +425,8 @@ public class JavaCompiler {
verboseCompilePolicy = options.isSet("verboseCompilePolicy"); verboseCompilePolicy = options.isSet("verboseCompilePolicy");
if (options.isSet("shouldStopPolicy") && if (options.isSet("shouldstop.at") &&
CompileState.valueOf(options.get("shouldStopPolicy")) == CompileState.ATTR) CompileState.valueOf(options.get("shouldstop.at")) == CompileState.ATTR)
compilePolicy = CompilePolicy.ATTR_ONLY; compilePolicy = CompilePolicy.ATTR_ONLY;
else else
compilePolicy = CompilePolicy.decode(options.get("compilePolicy")); compilePolicy = CompilePolicy.decode(options.get("compilePolicy"));
@ -439,14 +439,14 @@ public class JavaCompiler {
: null; : null;
shouldStopPolicyIfError = shouldStopPolicyIfError =
options.isSet("shouldStopPolicy") // backwards compatible options.isSet("shouldstop.at") // backwards compatible
? CompileState.valueOf(options.get("shouldStopPolicy")) ? CompileState.valueOf(options.get("shouldstop.at"))
: options.isSet("shouldStopPolicyIfError") : options.isSet("shouldstop.ifError")
? CompileState.valueOf(options.get("shouldStopPolicyIfError")) ? CompileState.valueOf(options.get("shouldstop.ifError"))
: CompileState.INIT; : CompileState.INIT;
shouldStopPolicyIfNoError = shouldStopPolicyIfNoError =
options.isSet("shouldStopPolicyIfNoError") options.isSet("shouldstop.ifNoError")
? CompileState.valueOf(options.get("shouldStopPolicyIfNoError")) ? CompileState.valueOf(options.get("shouldstop.ifNoError"))
: CompileState.GENERATE; : CompileState.GENERATE;
if (options.isUnset("oldDiags")) if (options.isUnset("oldDiags"))

View file

@ -543,6 +543,19 @@ public enum Option {
} }
}, },
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) { XADDEXPORTS("-XaddExports:", "opt.arg.addExports", "opt.addExports", EXTENDED, BASIC) {
@Override @Override
public boolean process(OptionHelper helper, String option) { public boolean process(OptionHelper helper, String option) {

View file

@ -222,7 +222,7 @@ class TaskFactory {
this(wraps.stream(), this(wraps.stream(),
new WrapSourceHandler(), new WrapSourceHandler(),
Util.join(new String[] { Util.join(new String[] {
"-XDshouldStopPolicy=FLOW", "-Xlint:unchecked", "-Xshouldstop:at=FLOW", "-Xlint:unchecked",
"-XaddExports:jdk.jshell/jdk.internal.jshell.remote=ALL-UNNAMED", "-XaddExports:jdk.jshell/jdk.internal.jshell.remote=ALL-UNNAMED",
"-proc:none" "-proc:none"
}, extraArgs)); }, extraArgs));

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8026963 * @bug 8026963
* @summary type annotations code crashes for lambdas with void argument * @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 { public class TypeAnnotationsCrashWithErroneousTreeTest {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -237,7 +237,7 @@ public class VerifyErroneousAnnotationsAttributed {
JavacTask task = tool.getTask(null, JavacTask task = tool.getTask(null,
fm, fm,
devNull, devNull,
Arrays.asList("-XDshouldStopPolicy=FLOW"), Arrays.asList("-Xshouldstop:at=FLOW"),
null, null,
Arrays.asList(new MyFileObject(code))); Arrays.asList(new MyFileObject(code)));

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ public class AfterMethodTypeParams {
String test = TEMPLATE.replace("CONTENT", tc.snippet); String test = TEMPLATE.replace("CONTENT", tc.snippet);
List<JavaFileObject> files = Arrays.asList(new MyFileObject(test)); List<JavaFileObject> files = Arrays.asList(new MyFileObject(test));
StringWriter out = new StringWriter(); 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); JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files);
new TreePathScanner<Void, Void>() { new TreePathScanner<Void, Void>() {

View file

@ -63,11 +63,11 @@ public class EventsBalancedTest {
test(null, Arrays.asList(b, a)); test(null, Arrays.asList(b, a));
for (CompileState stop : CompileState.values()) { for (CompileState stop : CompileState.values()) {
test(Arrays.asList("-XDshouldStopPolicyIfNoError=" + stop, test(Arrays.asList("-Xshouldstop:ifNoError=" + stop,
"-XDshouldStopPolicyIfError=" + stop), "-Xshouldstop:ifError=" + stop),
Arrays.asList(a, b)); Arrays.asList(a, b));
test(Arrays.asList("-XDshouldStopPolicyIfNoError=" + stop, test(Arrays.asList("-Xshouldstop:ifNoError=" + stop,
"-XDshouldStopPolicyIfError=" + stop), "-Xshouldstop:ifError=" + stop),
Arrays.asList(b, a)); Arrays.asList(b, a));
} }
} }

View file

@ -260,6 +260,9 @@ public class CheckResourceKeys {
// ignore debug flag names // ignore debug flag names
if (cs.startsWith("debug.")) if (cs.startsWith("debug."))
continue; continue;
// ignore shouldstop flag names
if (cs.startsWith("shouldstop."))
continue;
// explicit known exceptions // explicit known exceptions
if (noResourceRequired.contains(cs)) if (noResourceRequired.contains(cs))
continue; continue;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -311,7 +311,7 @@ public class CheckAttributedTree {
final List<CompilationUnitTree> trees = new ArrayList<>(); final List<CompilationUnitTree> trees = new ArrayList<>();
Iterable<? extends Element> elems = newCompilationTask() Iterable<? extends Element> elems = newCompilationTask()
.withWriter(pw) .withWriter(pw)
.withOption("-XDshouldStopPolicy=ATTR") .withOption("-Xshouldstop:at=ATTR")
.withOption("-XDverboseCompilePolicy") .withOption("-XDverboseCompilePolicy")
.withSource(files.iterator().next()) .withSource(files.iterator().next())
.withListener(new TaskListener() { .withListener(new TaskListener() {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 = "" } } class Test { { x = "" } }

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test implements AutoCloseable {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -4,7 +4,7 @@
* @summary Flow.java should be more error-friendly * @summary Flow.java should be more error-friendly
* @author mcimadamore * @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 { class Test extends Test {

View file

@ -3,7 +3,7 @@
* @bug 6970584 7060926 * @bug 6970584 7060926
* @summary Attr.PostAttrAnalyzer misses a case * @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 { class Test {

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8029718 * @bug 8029718
* @summary Should always use lambda body structure to disambiguate overload resolution * @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 { class MostSpecific09 {

View file

@ -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: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: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: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: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: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)} 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: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: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: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: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: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: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)} 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)}

View file

@ -119,7 +119,7 @@ public class AddLimitMods extends ModuleTestBase {
//real test //real test
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "java.base") "-limitmods", "java.base")
.outdir(modulePath) .outdir(modulePath)
.files(findJavaFiles(m1)) .files(findJavaFiles(m1))
@ -128,7 +128,7 @@ public class AddLimitMods extends ModuleTestBase {
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "java.base", "-limitmods", "java.base",
"-addmods", "m2") "-addmods", "m2")
.outdir(modulePath) .outdir(modulePath)
@ -138,7 +138,7 @@ public class AddLimitMods extends ModuleTestBase {
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "java.base", "-limitmods", "java.base",
"-addmods", "m2,m3") "-addmods", "m2,m3")
.outdir(modulePath) .outdir(modulePath)
@ -148,7 +148,7 @@ public class AddLimitMods extends ModuleTestBase {
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "m2") "-limitmods", "m2")
.outdir(modulePath) .outdir(modulePath)
.files(findJavaFiles(m1)) .files(findJavaFiles(m1))
@ -157,7 +157,7 @@ public class AddLimitMods extends ModuleTestBase {
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "m3") "-limitmods", "m3")
.outdir(modulePath) .outdir(modulePath)
.files(findJavaFiles(m1)) .files(findJavaFiles(m1))
@ -166,7 +166,7 @@ public class AddLimitMods extends ModuleTestBase {
new JavacTask(tb) new JavacTask(tb)
.options("-modulepath", modulePath.toString(), .options("-modulepath", modulePath.toString(),
"-XDshouldStopPolicyIfNoError=FLOW", "-Xshouldstop:ifNoError=FLOW",
"-limitmods", "m3", "-limitmods", "m3",
"-addmods", "m2") "-addmods", "m2")
.outdir(modulePath) .outdir(modulePath)
@ -473,7 +473,7 @@ public class AddLimitMods extends ModuleTestBase {
auxOptions, auxOptions,
"-modulepath", modulePath.toString(), "-modulepath", modulePath.toString(),
"-classpath", classpathOut.toString(), "-classpath", classpathOut.toString(),
"-XDshouldStopPolicyIfNoError=FLOW")) "-Xshouldstop:ifNoError=FLOW"))
.outdir(modulePath) .outdir(modulePath)
.files(findJavaFiles(m2)) .files(findJavaFiles(m2))
.run(success ? Task.Expect.SUCCESS : Task.Expect.FAIL) .run(success ? Task.Expect.SUCCESS : Task.Expect.FAIL)

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@
import java.io.*; import java.io.*;
import java.util.*; 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, // 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 // then using -XDverboseCompilePolicy we check that the compilation gets as
// far as expected, but no further. // far as expected, but no further.
@ -83,7 +83,7 @@ public class Test {
args.add("-d"); args.add("-d");
args.add("."); args.add(".");
if (ssp.needOption) if (ssp.needOption)
args.add("-XDshouldStopPolicy=" + ssp); args.add("-Xshouldstop:at=" + ssp);
args.add(new File(System.getProperty("test.src", "."), "A.java").getPath()); args.add(new File(System.getProperty("test.src", "."), "A.java").getPath());
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -145,7 +145,7 @@ public class TreeEndPosTest {
options.add(tempDir.getPath()); options.add(tempDir.getPath());
options.add("-d"); options.add("-d");
options.add(tempDir.getPath()); options.add(tempDir.getPath());
options.add("-XDshouldStopPolicy=GENERATE"); options.add("-Xshouldstop:at=GENERATE");
List<JavaFileObject> sources = new ArrayList<>(); List<JavaFileObject> sources = new ArrayList<>();
sources.add(src); sources.add(src);

View file

@ -132,7 +132,7 @@ public class ResolveHarness implements javax.tools.DiagnosticListener<JavaFileOb
protected void check() throws Exception { protected void check() throws Exception {
String[] options = { String[] options = {
"-XDshouldStopPolicy=ATTR", "-Xshouldstop:at=ATTR",
"-Xdebug:verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef" "-Xdebug:verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
}; };