diff --git a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java index c0a0e02d50..b1997385e6 100644 --- a/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java +++ b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java @@ -308,7 +308,6 @@ public static Stream getTypeUseAnnotations( Symbol typeAnnotationOwner; switch (symbol.getKind()) { case PARAMETER: - // use the symbol's owner for parameters, unless it's the parameter of a lambda typeAnnotationOwner = symbol.owner; break; default: diff --git a/nullaway/src/test/java/com/uber/nullaway/Java8Tests.java b/nullaway/src/test/java/com/uber/nullaway/Java8Tests.java index 83b535f7ea..85a1265512 100644 --- a/nullaway/src/test/java/com/uber/nullaway/Java8Tests.java +++ b/nullaway/src/test/java/com/uber/nullaway/Java8Tests.java @@ -58,10 +58,10 @@ public void testNullableLambdaParamTypeUse() { "class Test {", " @FunctionalInterface", " interface NullableParamFunctionTypeUse {", - " U takeVal(@org.jspecify.annotations.Nullable T x);", + " U takeVal(@Nullable T x);", " }", " static void testParamTypeUse() {", - " NullableParamFunctionTypeUse n3 = (@org.jspecify.annotations.Nullable Object x) -> (x == null) ? \"null\" : x.toString();", + " NullableParamFunctionTypeUse n3 = (@Nullable Object x) -> (x == null) ? \"null\" : x.toString();", " NullableParamFunctionTypeUse n4 = (x) -> (x == null) ? \"null\" : x.toString();", " }", "}")