--- old/test/langtools/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java 2018-07-23 23:32:02.676855324 -0700 +++ new/test/langtools/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java 2018-07-23 23:32:02.532855324 -0700 @@ -30,6 +30,7 @@ * @modules java.compiler * jdk.compiler * @build JavacTestingAbstractProcessor + * @compile annot/AnnotatedElementInfo.java annot/MarkerAnnot.java * @compile TestElementsAnnotatedWith.java * @compile InheritedAnnotation.java * @compile TpAnno.java @@ -41,11 +42,13 @@ * @compile -processor TestElementsAnnotatedWith -proc:only Foo.java * @compile -processor TestElementsAnnotatedWith -proc:only TypeParameterAnnotations.java * @compile -processor TestElementsAnnotatedWith -proc:only ParameterAnnotations.java + * @compile -processor TestElementsAnnotatedWith -proc:only pkg/package-info.java * @compile/fail/ref=ErroneousAnnotations.out -processor TestElementsAnnotatedWith -proc:only -XDrawDiagnostics ErroneousAnnotations.java * @compile Foo.java * @compile/process -processor TestElementsAnnotatedWith -proc:only Foo */ +import annot.AnnotatedElementInfo; import java.lang.annotation.Annotation; import java.util.Collections; import java.util.Set; @@ -148,7 +151,7 @@ * getElementsAnnotatedWith(X) UNION getElementsAnnotatedWith(Y). */ void checkSetOfAnnotatedElements(RoundEnvironment re) { - TypeElement annotatedElemInfoElem = elements.getTypeElement("AnnotatedElementInfo"); + TypeElement annotatedElemInfoElem = elements.getTypeElement("annot.AnnotatedElementInfo"); // For the "Any" methods, search for both the expected // annotation and AnnotatedElementInfo and verify the return @@ -168,15 +171,15 @@ // Verify AnnotatedElementInfo is present on the first // specified type. - TypeElement firstType = typesIn(re.getRootElements()).iterator().next(); + Element firstElement = re.getRootElements().iterator().next(); AnnotatedElementInfo annotatedElemInfo = - firstType.getAnnotation(AnnotatedElementInfo.class); + firstElement.getAnnotation(AnnotatedElementInfo.class); boolean failed = false; Objects.requireNonNull(annotatedElemInfo, - "Missing AnnotatedElementInfo annotation on " + firstType); + "Missing AnnotatedElementInfo annotation on " + firstElement); // Verify that the annotation information is as expected. Set expectedNames =