SUGGESTED FIX
src/share/classes/javax/annotation/processing>sccs sccsdiff -r1.2 -r1.3 RoundEnvironment.java
------- RoundEnvironment.java -------
12a13
> import java.lang.annotation.Annotation;
68a70,83
>
> /**
> * Returns the elements annotated with the given annotation type.
> * Only type elements <i>included</i> in this round of annotation
> * processing, or declarations of members, parameters, or type
> * parameters declared within those, are returned. Included type
> * elements are {@linkplain #getSpecifiedTypeElements specified
> * types} and any types nested within them.
> *
> * @param a annotation type being requested
> * @return the elements annotated with the given annotation type,
> * or an empty set if there are none
> */
> Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a);
src/share/classes/com/sun/tools/javac/processing>sccs sccsdiff -r1.3 -r1.4 JavacRoundEnvironment.java
------- JavacRoundEnvironment.java -------
12a13
> import java.lang.annotation.Annotation;
17d17
< import javax.annotation.processing.*;
37a38,39
> private ProcessingEnvironment processingEnv;
>
42c44,45
< Set<? extends TypeElement> specifiedTypeElements) {
---
> Set<? extends TypeElement> specifiedTypeElements,
> ProcessingEnvironment processingEnv) {
46a50
> this.processingEnv = processingEnv;
136a141,156
>
> /**
> * {@inheritdoc}
> */
> public Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a) {
> String name = a.getCanonicalName();
> if (name == null)
> return Collections.emptySet();
> else {
> TypeElement annotationType = processingEnv.getElementUtils().getTypeElement(name);
> if (annotationType == null)
> return Collections.emptySet();
> else
> return getElementsAnnotatedWith(annotationType);
> }
> }
See bug 6411919 for changes to src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
|