From 16d6c2ce1a45ea7d77150b1aa8b8c6315f470115 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Tue, 17 Dec 2024 09:13:04 -0800 Subject: [PATCH] Fix comment positions --- .../src/main/java/com/uber/nullaway/NullabilityUtil.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java index 5ffc0454fd..acdfd60b49 100644 --- a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java +++ b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java @@ -346,8 +346,7 @@ 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: + case ENUM_CONSTANT: // treated like a field return position.type == TargetType.FIELD; case CONSTRUCTOR: case METHOD: @@ -367,8 +366,7 @@ private static boolean targetTypeMatches(Symbol sym, TypeAnnotationPosition posi return false; } case CLASS: - // treated like a class - case ENUM: + case ENUM: // treated like a class // There are no type annotations on the top-level type of the class/enum being declared, // only on other types in the signature (e.g. `class Foo extends Bar<@A Baz> {}`). return false;