8219561: Update jdeprscan to avoid the need for start-of-release changes

Reviewed-by: dfuchs, lancea, smarks
This commit is contained in:
Joe Darcy 2019-02-25 14:45:29 -08:00
parent 8813c391df
commit 1610706716

View File

@ -45,6 +45,8 @@ import java.util.Map;
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 @@ public class Main implements DiagnosticListener<JavaFileObject> {
// 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;
{