8028544: Add SourceVersion.RELEASE_10

8028546: Add -source 10 and -target 10 to javac

Reviewed-by: jjg, smarks
This commit is contained in:
Joe Darcy 2017-01-27 16:22:08 -08:00
parent a4ed1aefb8
commit 874b8cdc74
19 changed files with 100 additions and 75 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, 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
@ -27,7 +27,8 @@
* @summary If an error is produced by an annotation processor, the code should not be Attred, \
* unless requested
* @modules jdk.compiler
* @compile StopAfterError.java
* @library /tools/javac/lib
* @build StopAfterError JavacTestingAbstractProcessor
* @compile/fail/ref=StopAfterError.out -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
* @compile/fail/ref=StopAfterError.out -XDshould-stop.ifError=PROCESS -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
* @compile/fail/ref=StopAfterErrorContinue.out -XDshould-stop.ifError=ATTR -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
@ -42,8 +43,7 @@ import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic.Kind;
@SupportedAnnotationTypes("*")
public class StopAfterError extends AbstractProcessor {
public class StopAfterError extends JavacTestingAbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@ -52,10 +52,4 @@ public class StopAfterError extends AbstractProcessor {
}
return false;
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}
}