diff --git a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java index f8d7386621..08db99285e 100644 --- a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java +++ b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java @@ -337,6 +337,8 @@ private static boolean targetTypeMatches(Symbol sym, TypeAnnotationPosition posi case LOCAL_VARIABLE: return position.type == TargetType.LOCAL_VARIABLE; case FIELD: + // treated like a field + case ENUM_CONSTANT: return position.type == TargetType.FIELD; case CONSTRUCTOR: case METHOD: