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
I have a problem when I try to use @Nullable and third party library that does not have null-safety, this snippet:
class B {
static final AttributeKey<@Nullable Object> RESULT_UPDATER = AttributeKey.valueOf("result");
final Channel channel = new EmbeddedChannel();
B() {
System.out.println("Current Attribute " + channel.attr(RESULT_UPDATER).get());
}
}
Gives the following error:
/nullaway-mismatched-nullability/src/main/java/org/example/B.java:9: error: [NullAway] Cannot assign from type AttributeKey<Object> to type AttributeKey<@Nullable Object> due to mismatched nullability of type parameters
static final AttributeKey<@Nullable Object> RESULT_UPDATER = AttributeKey.valueOf("result");
^
Thanks again for the report! This is again #1075 and you can work around with an explicit type argument to the call. I will report back when we have a fix.
I have a problem when I try to use
@Nullable
and third party library that does not have null-safety, this snippet:Gives the following error:
The repository with the reproducible example can be found here
https://github.com/violetagg/nullaway-mismatched-nullability
The text was updated successfully, but these errors were encountered: