--- old/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java 2018-06-25 16:59:19.000000000 -0700 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java 2018-06-25 16:59:18.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -38,6 +38,7 @@ import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedSourceVersion; +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.ExecutableElement; @@ -50,15 +51,12 @@ import javax.tools.Diagnostic; -import static javax.lang.model.SourceVersion.RELEASE_11; - /** * Annotation processor for the Deprecation Scanner tool. * Examines APIs for deprecated elements and records information * */ @SupportedAnnotationTypes("java.lang.Deprecated") -@SupportedSourceVersion(RELEASE_11) public class LoadProc extends AbstractProcessor { Elements elements; Messager messager; @@ -75,6 +73,11 @@ } @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + + @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) { return false; --- old/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/TraverseProc.java 2018-06-25 16:59:20.000000000 -0700 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/TraverseProc.java 2018-06-25 16:59:20.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -41,18 +41,16 @@ import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedSourceVersion; -import javax.lang.model.element.ModuleElement; -import javax.lang.model.element.TypeElement; -import javax.lang.model.util.Elements; - -import static javax.lang.model.SourceVersion.RELEASE_10; +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.Modifier; +import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; +import javax.lang.model.element.TypeElement; +import javax.lang.model.util.Elements; import javax.tools.Diagnostic; -@SupportedSourceVersion(RELEASE_10) @SupportedAnnotationTypes("*") public class TraverseProc extends AbstractProcessor { Elements elements; @@ -72,6 +70,11 @@ } @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + + @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) { return false; --- old/test/langtools/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java 2018-06-25 16:59:22.000000000 -0700 +++ new/test/langtools/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java 2018-06-25 16:59:22.000000000 -0700 @@ -44,7 +44,10 @@ public class TestRelease { static boolean invoke(String arg) { - return Main.call(System.out, System.err, "--list", "--release", arg); + System.err.println(">>> invoking Main.call with arguments: --list --release " + arg); + boolean r = Main.call(System.out, System.err, "--list", "--release", arg); + System.err.println(">>> Main.call returned " + r); + return r; } @Test