mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
duplicate throws: ensure checks are proceed with correct type after first problem detected (IDEA-145542)
This commit is contained in:
+1
-1
@@ -63,8 +63,8 @@ public class DuplicateThrowsInspection extends BaseJavaBatchLocalInspectionTool
|
||||
PsiJavaCodeReferenceElement[] refs = throwsList.getReferenceElements();
|
||||
PsiClassType[] types = throwsList.getReferencedTypes();
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
PsiClassType type = types[i];
|
||||
for (int j = i+1; j < types.length; j++) {
|
||||
PsiClassType type = types[i];
|
||||
PsiClassType otherType = types[j];
|
||||
String problem = null;
|
||||
PsiJavaCodeReferenceElement ref = refs[i];
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Suppress for method" "false"
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
class Main {
|
||||
public void test() throws Exce<caret>ption, FileNotFoundException, IOException {}
|
||||
}
|
||||
+3
-1
@@ -19,6 +19,7 @@ import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.accessStaticViaInstance.AccessStaticViaInstance;
|
||||
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection;
|
||||
import com.intellij.codeInspection.deprecation.DeprecationInspection;
|
||||
import com.intellij.codeInspection.duplicateThrows.DuplicateThrowsInspection;
|
||||
import com.intellij.codeInspection.javaDoc.JavaDocReferenceInspection;
|
||||
import com.intellij.codeInspection.sillyAssignment.SillyAssignmentInspection;
|
||||
import com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection;
|
||||
@@ -43,7 +44,8 @@ public class Suppress15InspectionsTest extends LightQuickFixParameterizedTestCas
|
||||
new AccessStaticViaInstance(),
|
||||
new DeprecationInspection(),
|
||||
new JavaDocReferenceInspection(),
|
||||
new UncheckedWarningLocalInspection()
|
||||
new UncheckedWarningLocalInspection(),
|
||||
new DuplicateThrowsInspection()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user