diff --git a/nullaway/src/main/java/com/uber/nullaway/NullAway.java b/nullaway/src/main/java/com/uber/nullaway/NullAway.java index 37a11036a9..edc56a1fd2 100644 --- a/nullaway/src/main/java/com/uber/nullaway/NullAway.java +++ b/nullaway/src/main/java/com/uber/nullaway/NullAway.java @@ -1521,7 +1521,6 @@ private static boolean isDeclarationAnnotation(Symbol anno) { if (target == null) { return true; } - ; ImmutableSet elementTypes = ImmutableSet.copyOf(target.value()); // Return true only if annotation is not type-use only return !(elementTypes.equals(ImmutableSet.of(ElementType.TYPE_USE)) @@ -1552,12 +1551,7 @@ private void handleNullabilityOnNestedClass( continue; } - Symbol annotationSymbol = ASTHelpers.getSymbol(annotation); - if (annotationSymbol == null) { - continue; - } - - String qualifiedName = annotationSymbol.getQualifiedName().toString(); + String qualifiedName = sym.getQualifiedName().toString(); if (!isNullableAnnotation(qualifiedName, config)) { continue; }