-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undetected @Nullable
annotation in a method reference
#1128
Comments
@Nullable
annotation in a default method reference@Nullable
annotation in a method reference
I can reproduce this one. It's not about default methods, but the fact that the call is to a generic method and we don't handle the instances of |
As suggested here by @msridhar, I'm sharing a test case that may be relevant to this issue: import static com.google.common.collect.ImmutableTable.toImmutableTable;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Table;
import com.google.common.collect.Tables;
import java.util.stream.Stream;
final class Test {
ImmutableTable<String, String, String> m() {
return Stream.of(Tables.immutableCell("foo", "bar", "baz"))
.collect(
toImmutableTable(
Table.Cell::getRowKey, Table.Cell::getColumnKey, Table.Cell::getValue));
}
} This triggers the following warnings:
This happens only in JSpecify mode. The three flagged methods have had |
With the JSpecify mode enabled, I have this interface:
And:
I get the following IMO invalid error:
The text was updated successfully, but these errors were encountered: