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 2a3d593227..4c84992619 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 @@ -158,14 +158,13 @@ private static ImmutableTable getUndesire if (importTree.isStatic() && qualifiedIdentifier instanceof MemberSelectTree) { MemberSelectTree memberSelectTree = (MemberSelectTree) qualifiedIdentifier; String type = SourceCode.treeToString(memberSelectTree.getExpression(), state); - String memberIdentifier = memberSelectTree.getIdentifier().toString(); - if (shouldNotBeStaticallyImported(type, memberIdentifier)) { + String member = memberSelectTree.getIdentifier().toString(); + if (shouldNotBeStaticallyImported(type, member)) { imports.put( type, - memberIdentifier, + member, new AutoValue_NonStaticImport_UndesiredStaticImport( - importTree, - SuggestedFix.builder().removeStaticImport(type + '.' + memberIdentifier))); + importTree, SuggestedFix.builder().removeStaticImport(type + '.' + member))); } } }