< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java

Print this page
rev 50763 : 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 2016, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 36,45 **** --- 36,46 ---- import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.RoundEnvironment; 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; import javax.lang.model.element.TypeElement; import javax.lang.model.type.ArrayType;
*** 48,66 **** import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; 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; final List<DeprData> deprList = new ArrayList<>(); --- 49,64 ----
*** 73,82 **** --- 71,85 ---- elements = pe.getElementUtils(); messager = pe.getMessager(); } @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + + @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) { return false; }
< prev index next >