# HG changeset patch # User darcy # Date 1551134729 28800 # Node ID 7fec83061f244a24cba63439f4d660d3f544c1a6 # Parent ee4488381c78135bbb93ad93d6883ff5b8d0d721 8219561: Update jdeprscan to avoid the need for start-of-release changes Reviewed-by: dfuchs, lancea, smarks diff -r ee4488381c78 -r 7fec83061f24 src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java --- 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 releasesWithoutForRemoval = Set.of("6", "7", "8"); - final Set releasesWithForRemoval = Set.of("9", "10", "11", "12", "13"); + final Set releasesWithForRemoval = // "9", "10", "11", ... + IntStream.rangeClosed(9, Runtime.version().feature()) + .mapToObj(Integer::toString) + .collect(Collectors.toUnmodifiableSet()); final Set validReleases; {