You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nestedAnnotationsForMethods on return value dropped in type inference #1942
The new JDK models annotate some methods as returning CompletableFuture<@Nullable Void>. But when used in an argument from which a type variable is inferred, the model's @Nullable gets dropped.
For example:
// allowedCompletableFuture<@NullableVoid> f1 = CompletableFuture.allOf();
// [NullAway] incompatible types: CompletableFuture<Void> cannot be converted to CompletableFuture<@Nullable Void>CompletableFuture<@NullableVoid> f2 = Optional.of(CompletableFuture.allOf()).get();
Thanks for the report! @subhramit is working on a deeper fix for this type of issue by addressing #1585. Rather than adding another hack for this specific case, I think we'll wait to see if that better fix works out
Activity
msridhar commentedon Oct 9, 2026
Thanks for the report! @subhramit is working on a deeper fix for this type of issue by addressing #1585. Rather than adding another hack for this specific case, I think we'll wait to see if that better fix works out
subhramit commentedon Oct 9, 2026
Ack @jeffrey-easyesi, thanks for the report.
Expect this to be fixed in an upcoming release.
Add testcase for apache#1942 to patch plan