diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreASTHelpers.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreASTHelpers.java index d2dec28a88..b0d4bcaddc 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreASTHelpers.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/util/MoreASTHelpers.java @@ -52,9 +52,9 @@ public static boolean methodExistsInEnclosingClass(CharSequence methodName, Visi } /** - * Returns the {@link MethodTree} from which the control flow would exit if there would be a - * {@code return} statement at the given {@link VisitorState}'s current {@link - * VisitorState#getPath() path}. + * Returns the {@link MethodTree} from which control flow would exit if there would be a {@code + * return} statement at the given {@link VisitorState}'s current {@link VisitorState#getPath() + * path}. * * @param state The {@link VisitorState} from which to derive the AST location of interest. * @return A {@link MethodTree}, unless the {@link VisitorState}'s path does not point to an AST diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/DirectReturnTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/DirectReturnTest.java index c9f4411318..be455b123f 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/DirectReturnTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/DirectReturnTest.java @@ -129,7 +129,7 @@ void identification() { " }", " }", "", - " Supplier redundantAssignmentInLambda() {", + " Supplier redundantAssignmentInsideLambda() {", " return () -> {", " // BUG: Diagnostic contains:", " String variable = toString();",