diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchers.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchers.java index 0685d74bc6..ad835aa23d 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchers.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchers.java @@ -16,13 +16,13 @@ public final class MoreMatchers { private MoreMatchers() {} /** - * Determines whether an expression has a meta annotation of the given class name. This includes + * Determines whether a tree has a meta annotation of the given class name. This includes * annotations inherited from superclasses due to {@link java.lang.annotation.Inherited}. * - * @param The type of the expression tree. // XXX: Not expression per se. + * @param The type of the tree. * @param annotationClass The binary class name of the annotation (e.g. " * org.jspecify.nullness.Nullable", or "some.package.OuterClassName$InnerClassName") - * @return A {@link Matcher} that matches expressions with the specified meta annotation. + * @return A {@link Matcher} that matches trees with the specified meta annotation. */ public static Matcher hasMetaAnnotation(String annotationClass) { TypePredicate typePredicate = hasAnnotation(annotationClass); diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchersTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchersTest.java index fc295a941e..34789d4426 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchersTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MoreMatchersTest.java @@ -18,11 +18,11 @@ void matcher() { CompilationTestHelper.newInstance(TestMatcher.class, getClass()) .addSourceLines( "/A.java", + "import org.junit.jupiter.api.AfterAll;", "import org.junit.jupiter.api.RepeatedTest;", "import org.junit.jupiter.api.Test;", - "import org.junit.jupiter.api.AfterAll;", - "import org.junit.jupiter.params.ParameterizedTest;", "import org.junit.jupiter.api.TestTemplate;", + "import org.junit.jupiter.params.ParameterizedTest;", "", "class A {", " private void negative1() {}", @@ -30,7 +30,6 @@ void matcher() { " @Test", " void negative2() {}", "", - "", " @TestTemplate", " void negative3() {}", "",