mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: warn on covariant equals() in interface but not implementations
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ public class CovariantEqualsInspection extends BaseInspection {
|
||||
return;
|
||||
}
|
||||
final PsiClass aClass = method.getContainingClass();
|
||||
if (aClass == null || aClass.isInterface()) {
|
||||
if (aClass == null) {
|
||||
return;
|
||||
}
|
||||
final PsiMethod[] methods = aClass.getMethods();
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
interface I {
|
||||
boolean equals(I i);
|
||||
boolean <warning descr="'equals()' should take 'Object' as its argument">equals</warning>(I i);
|
||||
}
|
||||
class A {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user