mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit4|3 problems: check if class extends test case before warn about @Ignore (IDEA-74800)
This commit is contained in:
+8
-8
@@ -196,18 +196,18 @@ public class JUnit4AnnotatedMethodInJUnit3TestCaseInspection extends
|
||||
@Override
|
||||
public void visitMethod(PsiMethod method) {
|
||||
super.visitMethod(method);
|
||||
if (AnnotationUtil.isAnnotated(method, IGNORE, false) && method.getName().startsWith("test")) {
|
||||
registerMethodError(method, method);
|
||||
return;
|
||||
}
|
||||
if (!TestUtils.isJUnit4TestMethod(method)) {
|
||||
return;
|
||||
}
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
if (containingClass == null) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
if (!TestUtils.isJUnitTestClass(containingClass)) {
|
||||
return;
|
||||
}
|
||||
if (AnnotationUtil.isAnnotated(method, IGNORE, false) && method.getName().startsWith("test")) {
|
||||
registerMethodError(method, method);
|
||||
return;
|
||||
}
|
||||
if (!TestUtils.isJUnit4TestMethod(method)) {
|
||||
return;
|
||||
}
|
||||
final String className = containingClass.getName();
|
||||
|
||||
Reference in New Issue
Block a user