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
UseInstanceofToCompareClasses reports on non-reifiable types, even though they're not acceptable as operand to instanceof. E.g.:
classFoo<T> {
publicFoo<T> wrap() {
// since the local class is not static, the T here refers to the T of the outer instanceclassMyWrapperextendsFoo<T> {
}
thisinstanceofMyWrapper// -> error, MyWrapper is not reifiable, because its supertype Foo<T> isn't this.getClass().equals(MyWrapper.class) // this is the only way to compare it
}
}
The text was updated successfully, but these errors were encountered:
jsotuyod
changed the title
False positive for UseInstanceofToCompareClasses on local generic class
[java] False positive for UseInstanceofToCompareClasses on local generic class
Apr 8, 2019
UseInstanceofToCompareClasses reports on non-reifiable types, even though they're not acceptable as operand to
instanceof
. E.g.:The text was updated successfully, but these errors were encountered: