8028544: Add SourceVersion.RELEASE_10
authordarcy
Fri, 27 Jan 2017 16:22:08 -0800
changeset 43646 017aba6e9260
parent 43645 478f54e75765
child 43647 d21da31c6c0a
8028544: Add SourceVersion.RELEASE_10 8028546: Add -source 10 and -target 10 to javac Reviewed-by: jjg, smarks
langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java
langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
langtools/test/tools/javac/api/T6265137.java
langtools/test/tools/javac/api/T6395981.java
langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java
langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java
langtools/test/tools/javac/processing/model/TestSourceVersion.java
langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java
langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java
langtools/test/tools/javac/profiles/ProfileOptionTest.java
langtools/test/tools/javac/tree/ArrayTypeToString.java
langtools/test/tools/javac/versions/Versions.java
langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -56,6 +56,7 @@
      * 1.7: diamond syntax, try-with-resources, etc.
      * 1.8: lambda expressions and default methods
      *   9: modules, small cleanups to 1.7 and 1.8 changes
+     *  10: to-be-determined changes
      */
 
     /**
@@ -150,7 +151,15 @@
      *
      * @since 9
      */
-     RELEASE_9;
+     RELEASE_9,
+
+    /**
+     * The version recognized by the Java Platform, Standard Edition
+     * 10.
+     *
+     * @since 10
+     */
+     RELEASE_10;
 
     // Note that when adding constants for newer releases, the
     // behavior of latest() and latestSupported() must be updated too.
@@ -161,7 +170,7 @@
      * @return the latest source version that can be modeled
      */
     public static SourceVersion latest() {
-        return RELEASE_9;
+        return RELEASE_10;
     }
 
     private static final SourceVersion latestSupported = getLatestSupported();
@@ -171,6 +180,8 @@
             String specVersion = System.getProperty("java.specification.version");
 
             switch (specVersion) {
+                case "10":
+                    return RELEASE_10;
                 case "9":
                 case "1.9":
                     return RELEASE_9;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -70,8 +70,11 @@
     /** 1.8 lambda expressions and default methods. */
     JDK1_8("1.8"),
 
-    /** 1.9 covers the to be determined language features that will be added in JDK 9. */
-    JDK1_9("1.9");
+    /** 1.9 modularity. */
+    JDK1_9("1.9"),
+
+    /** 1.10 covers the to be determined language features that will be added in JDK 10. */
+    JDK1_10("1.10");
 
     private static final Context.Key<Source> sourceKey = new Context.Key<>();
 
@@ -99,6 +102,7 @@
         tab.put("7", JDK1_7); // Make 7 an alias for 1.7
         tab.put("8", JDK1_8); // Make 8 an alias for 1.8
         tab.put("9", JDK1_9); // Make 9 an alias for 1.9
+        tab.put("10", JDK1_10); // Make 10 an alias for 1.10
     }
 
     private Source(String name) {
@@ -116,6 +120,7 @@
     }
 
     public Target requiredTarget() {
+        if (this.compareTo(JDK1_10) >= 0) return Target.JDK1_10;
         if (this.compareTo(JDK1_9) >= 0) return Target.JDK1_9;
         if (this.compareTo(JDK1_8) >= 0) return Target.JDK1_8;
         if (this.compareTo(JDK1_7) >= 0) return Target.JDK1_7;
@@ -240,6 +245,8 @@
             return RELEASE_8;
         case JDK1_9:
             return RELEASE_9;
+        case JDK1_10:
+            return RELEASE_10;
         default:
             return null;
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -40,9 +40,9 @@
  *  deletion without notice.</b>
  */
 public enum Profile {
-    COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9),
-    COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9),
-    COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9),
+    COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
+    COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
+    COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
 
     DEFAULT {
         @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -61,7 +61,10 @@
     JDK1_8("1.8", 52, 0),
 
     /** JDK 9. */
-    JDK1_9("1.9", 53, 0);
+    JDK1_9("1.9", 53, 0),
+
+    /** JDK 10, initially an alias for 9 */
+    JDK1_10("1.10", 53, 0);
 
     private static final Context.Key<Target> targetKey = new Context.Key<>();
 
@@ -91,6 +94,7 @@
         tab.put("7", JDK1_7);
         tab.put("8", JDK1_8);
         tab.put("9", JDK1_9);
+        tab.put("10", JDK1_10);
     }
 
     public final String name;
@@ -102,7 +106,7 @@
         this.minorVersion = minorVersion;
     }
 
-    public static final Target DEFAULT = JDK1_9;
+    public static final Target DEFAULT = values()[values().length - 1];
 
     public static Target lookup(String name) {
         return tab.get(name);
@@ -146,5 +150,4 @@
     public String multiReleaseValue() {
         return Integer.toString(this.ordinal() - Target.JDK1_1.ordinal() + 1);
     }
-
 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -90,6 +90,8 @@
             } catch (IOException | ProviderNotFoundException ex) {
             }
         }
+        // Workaround until full support for --release 9 distinct from --release 10
+        SUPPORTED_JAVA_PLATFORM_VERSIONS.add(targetNumericVersion(Target.JDK1_9));
         SUPPORTED_JAVA_PLATFORM_VERSIONS.add(targetNumericVersion(Target.DEFAULT));
     }
 
@@ -108,7 +110,9 @@
 
         @Override
         public Collection<Path> getPlatformPath() {
-            if (Target.lookup(version) == Target.DEFAULT) {
+            // Comparison should be == Target.DEFAULT once --release 9
+            // is distinct from 10
+            if (Target.lookup(version).compareTo(Target.JDK1_9)  >=  0) {
                 return null;
             }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -52,7 +52,7 @@
  * deletion without notice.</b>
  */
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_9)
+@SupportedSourceVersion(SourceVersion.RELEASE_10)
 public class PrintingProcessor extends AbstractProcessor {
     PrintWriter writer;
 
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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
@@ -50,7 +50,7 @@
 
 import javax.tools.Diagnostic;
 
-import static javax.lang.model.SourceVersion.RELEASE_9;
+import static javax.lang.model.SourceVersion.RELEASE_10;
 
 /**
  * Annotation processor for the Deprecation Scanner tool.
@@ -58,7 +58,7 @@
  *
  */
 @SupportedAnnotationTypes("java.lang.Deprecated")
-@SupportedSourceVersion(RELEASE_9)
+@SupportedSourceVersion(RELEASE_10)
 public class LoadProc extends AbstractProcessor {
     Elements elements;
     Messager messager;
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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
@@ -101,7 +101,7 @@
     // Keep these updated manually until there's a compiler API
     // that allows querying of supported releases.
     final Set<String> releasesWithoutForRemoval = Set.of("6", "7", "8");
-    final Set<String> releasesWithForRemoval = Set.of("9");
+    final Set<String> releasesWithForRemoval = Set.of("9", "10");
 
     final Set<String> validReleases;
     {
@@ -353,14 +353,14 @@
      * Process classes from a particular JDK release, using only information
      * in this JDK.
      *
-     * @param release "6", "7", "8", or "9"
+     * @param release "6", "7", "8", "9", or "10"
      * @param classes collection of classes to process, may be empty
      * @return success value
      */
     boolean processRelease(String release, Collection<String> classes) throws IOException {
         options.addAll(List.of("--release", release));
 
-        if (release.equals("9")) {
+        if (release.equals("9") || release.equals("10")) {
             List<String> rootMods = List.of("java.se", "java.se.ee");
             TraverseProc proc = new TraverseProc(rootMods);
             JavaCompiler.CompilationTask task =
@@ -484,7 +484,7 @@
         String dir = null;
         String jar = null;
         String jdkHome = null;
-        String release = "9";
+        String release = "10";
         List<String> loadClasses = new ArrayList<>();
         String csvFile = null;
 
--- a/langtools/test/tools/javac/api/T6265137.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/api/T6265137.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -52,7 +52,7 @@
             String srcdir = System.getProperty("test.src");
             Iterable<? extends JavaFileObject> files =
                 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(srcdir, "T6265137a.java")));
-            javac.getTask(null, fm, dl, Arrays.asList("-target","9"), null, files).call();
+            javac.getTask(null, fm, dl, Arrays.asList("-target","10"), null, files).call();
         }
     }
 }
--- a/langtools/test/tools/javac/api/T6395981.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/api/T6395981.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6395981 6458819 7025784 8028543
+ * @bug     6395981 6458819 7025784 8028543 8028544
  * @summary JavaCompilerTool and Tool must specify version of JLS and JVMS
  * @author  Peter von der Ah\u00e9
  * @modules java.compiler
@@ -31,7 +31,7 @@
  * @run main/fail T6395981
  * @run main/fail T6395981 RELEASE_3 RELEASE_5 RELEASE_6
  * @run main/fail T6395981 RELEASE_0 RELEASE_1 RELEASE_2 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6
- * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9
+ * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9 RELEASE_10
  */
 
 import java.util.EnumSet;
--- a/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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.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 @@
         }
         return false;
     }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
-
 }
--- a/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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
@@ -26,7 +26,8 @@
  * @bug 8166700
  * @summary Check that local classes originating in static initializer can be loaded properly.
  * @modules jdk.compiler
- * @build LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest
+ * @library /tools/javac/lib
+ * @build LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest JavacTestingAbstractProcessor
  * @compile LocalClassesModel.java
  * @compile/process/ref=LocalClassesModel.out -processor LocalClassesModel LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest
  */
@@ -42,8 +43,7 @@
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.util.ElementFilter;
 
-@SupportedAnnotationTypes("*")
-public class LocalClassesModel extends AbstractProcessor {
+public class LocalClassesModel extends JavacTestingAbstractProcessor {
 
     @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@@ -65,9 +65,4 @@
 
         return false;
     }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
 }
--- a/langtools/test/tools/javac/processing/model/TestSourceVersion.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/processing/model/TestSourceVersion.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7025809 8028543 6415644
+ * @bug 7025809 8028543 6415644 8028544
  * @summary Test latest, latestSupported, underscore as keyword, etc.
  * @author  Joseph D. Darcy
  * @modules java.compiler
@@ -44,7 +44,7 @@
     }
 
     private static void testLatestSupported() {
-        if (SourceVersion.latest() != RELEASE_9 ||
+        if (SourceVersion.latest() != RELEASE_10 ||
             SourceVersion.latestSupported() != RELEASE_9)
             throw new RuntimeException("Unexpected release value(s) found:\n" +
                                        "latest:\t" + SourceVersion.latest() + "\n" +
--- a/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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
@@ -24,7 +24,8 @@
 /**
  * @test
  * @modules jdk.compiler
- * @build NestedTypeVars
+ * @library /tools/javac/lib
+ * @build NestedTypeVars JavacTestingAbstractProcessor
  * @compile/process/ref=NestedTypeVars.out -processor NestedTypeVars Test$1L1$L2$1L3$L4$L5 Test$1L1$CCheck Test$1L1 Test$1CCheck Test$CCheck Test
  */
 
@@ -44,8 +45,7 @@
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.util.ElementFilter;
 
-@SupportedAnnotationTypes("*")
-public class NestedTypeVars extends AbstractProcessor{
+public class NestedTypeVars extends JavacTestingAbstractProcessor {
 
     @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@@ -102,12 +102,6 @@
                 throw new IllegalStateException("Unexpected element: " + el + "(" + el.getKind() + ")");
         }
     }
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
-
-
 }
 
 class Test<T1, C> {
--- a/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -35,6 +35,7 @@
  * @compile/ref=gold_unsp_warn.out     -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_6 -source 1.6 -Xlint:-options -Aunsupported HelloWorld.java
  * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_7 -source 1.7 -Xlint:-options HelloWorld.java
  * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_8 -source 1.8 -Xlint:-options HelloWorld.java
+ * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_9 -source 1.9 -Xlint:-options HelloWorld.java
  */
 
 import java.util.Set;
--- a/langtools/test/tools/javac/profiles/ProfileOptionTest.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/profiles/ProfileOptionTest.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -148,6 +148,7 @@
                             error("unexpected exception from compiler: " + ise);
                         break;
                     case JDK1_9:
+                    case JDK1_10:
                         if (p == Profile.DEFAULT)
                             break;
                         if (ise == null)
--- a/langtools/test/tools/javac/tree/ArrayTypeToString.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/tree/ArrayTypeToString.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -26,7 +26,8 @@
  * @bug 8068737
  * @summary Tests ArrayType.toString with type annotations present
  * @modules jdk.compiler/com.sun.tools.javac.code
- * @build ArrayTypeToString
+ * @library /tools/javac/lib
+ * @build ArrayTypeToString JavacTestingAbstractProcessor
  * @compile/ref=ArrayTypeToString.out -XDaccessInternalAPI -XDrawDiagnostics -processor ArrayTypeToString -proc:only ArrayTypeToString.java
  */
 
@@ -54,8 +55,7 @@
 }
 
 @SupportedAnnotationTypes("Foo")
-@SupportedSourceVersion(SourceVersion.RELEASE_9)
-public class ArrayTypeToString extends AbstractProcessor {
+public class ArrayTypeToString extends JavacTestingAbstractProcessor {
     @Foo(0) String @Foo(1)[] @Foo(2)[] @Foo(3)[] field;
 
     public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
--- a/langtools/test/tools/javac/versions/Versions.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/javac/versions/Versions.java	Fri Jan 27 16:22:08 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610
+ * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546
  * @summary Check interpretation of -target and -source options
  * @modules java.compiler
  *          jdk.compiler
@@ -69,6 +69,7 @@
         check("53.0", "-source 1.7");
         check("53.0", "-source 1.8");
         check("53.0", "-source 1.9");
+        check("53.0", "-source 1.10");
 
         check_source_target("50.0", "6", "6");
         check_source_target("51.0", "6", "7");
@@ -80,6 +81,7 @@
         check_source_target("53.0", "7", "9");
         check_source_target("53.0", "8", "9");
         check_source_target("53.0", "9", "9");
+        check_source_target("53.0", "10", "10");
 
         checksrc16("-source 1.6");
         checksrc16("-source 6");
@@ -93,19 +95,26 @@
         checksrc18("-source 8");
         checksrc18("-source 1.8", "-target 1.8");
         checksrc18("-source 8", "-target 8");
-        checksrc19();
         checksrc19("-source 1.9");
         checksrc19("-source 9");
         checksrc19("-source 1.9", "-target 1.9");
         checksrc19("-source 9", "-target 9");
-        checksrc19("-target 1.9");
-        checksrc19("-target 9");
+
+        checksrc110();
+        checksrc110("-source 1.10");
+        checksrc110("-source 10");
+        checksrc110("-source 1.10", "-target 1.10");
+        checksrc110("-source 10", "-target 10");
+        checksrc110("-target 1.10");
+        checksrc110("-target 10");
 
         fail("-source 7", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.8", "Base.java");
+        fail("-source 10", "-target 1.7", "Base.java");
+        fail("-source 10", "-target 1.8", "Base.java");
 
         fail("-source 1.5", "-target 1.5", "Base.java");
         fail("-source 1.4", "-target 1.4", "Base.java");
@@ -202,6 +211,11 @@
         checksrc18(args);
     }
 
+    protected void checksrc110(String... args) {
+        printargs("checksrc110", args);
+        checksrc19(args);
+    }
+
     protected void pass(String... args) {
         printargs("pass", args);
 
--- a/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java	Wed Jan 25 22:32:52 2017 +0000
+++ b/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java	Fri Jan 27 16:22:08 2017 -0800
@@ -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
@@ -49,6 +49,7 @@
         assertTrue(invoke("7"));
         assertTrue(invoke("8"));
         assertTrue(invoke("9"));
+        assertTrue(invoke("10"));
     }
 
     @Test