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
The pattern NonApiType is reported for overridden methods for some types (e.g. ArrayList). For overridden methods it might not be possible to change the types. Maybe it is possible if type variables are used but that might imply other changes, and might therefore be out of scope for NonApiType.
Either overridden methods should be completely ignored, or maybe more sophisticated detection is needed which only reports this pattern if a covariant return type (more specific return type than needed) is used. For example if a method List<String> getResult() is overridden as ArrayList<String> getResult().
The text was updated successfully, but these errors were encountered:
Version
Error Prone: 2.31.0
JDK: 17
Description
The pattern
NonApiType
is reported for overridden methods for some types (e.g.ArrayList
). For overridden methods it might not be possible to change the types. Maybe it is possible if type variables are used but that might imply other changes, and might therefore be out of scope forNonApiType
.Example
Expected behavior
Either overridden methods should be completely ignored, or maybe more sophisticated detection is needed which only reports this pattern if a covariant return type (more specific return type than needed) is used. For example if a method
List<String> getResult()
is overridden asArrayList<String> getResult()
.The text was updated successfully, but these errors were encountered: