From 8f79c1903cd532c22432775f4895ba138617c016 Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Fri, 20 Jan 2023 08:46:41 +0100 Subject: [PATCH] Make sure JDK 11 doesnt crash --- .../tech/picnic/errorprone/bugpatterns/NonStaticImport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java index cbd89c5cdf2..6c1b7b743e6 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java @@ -116,7 +116,7 @@ public NonStaticImport() {} @Override public Description matchIdentifier(IdentifierTree tree, VisitorState state) { Symbol symbol = ASTHelpers.getSymbol(tree); - if (!isMatch(symbol, state)) { + if (symbol == null || !isMatch(symbol, state)) { return Description.NO_MATCH; }