Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Note: This is possibly a dupe of b/184838987 , but I don't know enough to say for sure.
Problem: I observed the following linter error in aosp/2075511:
The signature of
VersionApiService.onBind
is:It is overriding code search link ):
android.app.Service.onBind
which has the signature (If I understand the error correctly, it's indicating the return value of
VersionApiService.onBind
should not be nullable since the parent is unannotated. However, the parent is annotated as nullable andnull
is very explicitly a valid value to return (which we are).So, it seems like the InvalidNullabilityOverride case is incorrectly triggering. If I do a quick code search for "Invalid nullability on method
onBind
return" with p:aosp-androidx, I see there's currently 10 api_lint.ignore files with this.As an aside, as a troubleshooting step to ensure I wasn't misreading the error, I attempted to make the
intent: Intent?
parameter non-null (where the parent is unannotated). This does correctly trigger the InvalidNullabilityOverride case, indicating it cannot be NonNull if the super parameter is unannotated.