From ddb1ab045bfbf790eada64c290b6152c4bed48f6 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Fri, 11 Oct 2024 09:55:49 -0700 Subject: [PATCH] fix --- nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java | 2 ++ 1 file changed, 2 insertions(+) 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: