From 48b95a753f5c6deaa611dbc867d122a2674e98c8 Mon Sep 17 00:00:00 2001 From: Tyler Kindy Date: Fri, 14 Jun 2024 11:46:44 -0400 Subject: [PATCH] Ignore member refs and lambdas --- .../bugpatterns/ClassInitializationDeadlock.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/ClassInitializationDeadlock.java b/core/src/main/java/com/google/errorprone/bugpatterns/ClassInitializationDeadlock.java index ea569ddb2c3..398191e63ac 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/ClassInitializationDeadlock.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/ClassInitializationDeadlock.java @@ -38,6 +38,8 @@ import com.sun.source.tree.ClassTree; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.IdentifierTree; +import com.sun.source.tree.LambdaExpressionTree; +import com.sun.source.tree.MemberReferenceTree; import com.sun.source.tree.MemberSelectTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.Tree; @@ -112,6 +114,16 @@ public Void visitMethod(MethodTree node, Void unused) { return null; } + @Override + public Void visitMemberReference(MemberReferenceTree node, Void unused) { + return null; + } + + @Override + public Void visitLambdaExpression(LambdaExpressionTree node, Void unused) { + return null; + } + @Override public Void visitMemberSelect(MemberSelectTree tree, Void unused) { if (ASTHelpers.constValue(tree) != null) {