changeset 48425:5fb7750f22cd

8193191: Update JavacTestingAbstractProcessor for JDK 10 Reviewed-by: jjg
author darcy
date Thu, 07 Dec 2017 11:00:32 -0800
parents 0a8db756a7e7
children 1c1118deeedb c7f165d0eb68 085ab216acae 6dd657f5585d 9c11f247aab3 61ec0ccc1d5b 1242e71d4e38 c75b179b6add
files test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java
diffstat 1 files changed, 11 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java	Thu Dec 07 19:24:27 2017 +0100
+++ b/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java	Thu Dec 07 11:00:32 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -31,13 +31,7 @@
  * An abstract annotation processor tailored to {@code javac} regression testing.
  */
 public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
-    private static final Set<String> allAnnotations;
-
-    static {
-        Set<String> tmp = new HashSet<>();
-        tmp.add("*");
-        allAnnotations = Collections.unmodifiableSet(tmp);
-    }
+    private static final Set<String> allAnnotations = Set.of("*");
 
     protected Elements eltUtils;
     protected Elements elements;
@@ -116,7 +110,7 @@
      * corresponding platform visitor type.
      */
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
 
         /**
@@ -127,7 +121,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
@@ -137,7 +131,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
@@ -147,7 +141,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -168,7 +162,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class ElementScanner<R, P> extends ElementScanner9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -187,7 +181,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -208,7 +202,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -229,7 +223,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -250,7 +244,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_9)
+    @SupportedSourceVersion(RELEASE_10)
     public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}