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
Wrong class name used in error message when "this" is used in an anonymous inner class #1202
Foo.java:21: warning: [NullAway] Cannot pass parameter of type Foo., as formal parameter has type Callback<@Nullable Integer>, which has mismatched type parameter nullability
removeCallback(this);
^
(see http://t.uber.com/nullaway )
Note that "Foo" is the outer class, but the class it's complaining about is the anonymous Callback.
If you change main() to be static, it shows:
Foo.java:21: warning: [NullAway] Cannot pass parameter of type , as formal parameter has type Callback<@Nullable Integer>, which has mismatched type parameter nullability
removeCallback(this);
^
(see http://t.uber.com/nullaway )
Activity
agrieve commentedon Oct 1, 2025
Just hit this again. Note that there's a second more impactful bug here, which is that the nullness of "this" is incorrect.
For
It's saying that "this" is non-nullable, when it's nullable.
msridhar commentedon Oct 1, 2025
This is unrelated to the diamond operator, which we still don't support well. Even this version results in the same error:
Improve handling and error messages when using `this` inside an anony…