< prev index next >
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/TraverseProc.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
*** 39,60 ****
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
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.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.PackageElement;
import javax.tools.Diagnostic;
- @SupportedSourceVersion(RELEASE_10)
@SupportedAnnotationTypes("*")
public class TraverseProc extends AbstractProcessor {
Elements elements;
Messager messager;
final List<String> moduleRoots;
--- 39,58 ----
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.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;
@SupportedAnnotationTypes("*")
public class TraverseProc extends AbstractProcessor {
Elements elements;
Messager messager;
final List<String> moduleRoots;
*** 70,79 ****
--- 68,82 ----
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 >