changeset 55125:7fec83061f24

8219561: Update jdeprscan to avoid the need for start-of-release changes Reviewed-by: dfuchs, lancea, smarks
author darcy
date Mon, 25 Feb 2019 14:45:29 -0800
parents ee4488381c78
children ca1a2ca32885
files src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Mon Feb 25 08:16:20 2019 -0800
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Mon Feb 25 14:45:29 2019 -0800
@@ -45,6 +45,8 @@
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.Queue;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
 import java.util.jar.JarEntry;
@@ -106,7 +108,10 @@
     // 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", "10", "11", "12", "13");
+    final Set<String> releasesWithForRemoval = // "9", "10", "11", ...
+        IntStream.rangeClosed(9, Runtime.version().feature())
+        .mapToObj(Integer::toString)
+        .collect(Collectors.toUnmodifiableSet());
 
     final Set<String> validReleases;
     {