diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/ThrowableInstanceNeverThrown.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/ThrowableInstanceNeverThrown.java
index 711776a7d91c..6c49b9f13655 100644
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/ThrowableInstanceNeverThrown.java
+++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/ThrowableInstanceNeverThrown.java
@@ -14,7 +14,7 @@ public class ThrowableInstanceNeverThrown {
}
void bar() {
- new RuntimeException();
+ new RuntimeException();
}
void throwing() throws Throwable {
@@ -31,7 +31,7 @@ public class ThrowableInstanceNeverThrown {
}
void leftBehind() throws Throwable {
- final RuntimeException e = new RuntimeException("throw me");
+ final RuntimeException e = new RuntimeException("throw me");
}
void exceptionIsCollected() {
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/expected.xml
deleted file mode 100644
index 9dfb5295b08f..000000000000
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_instance_never_thrown/expected.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- ThrowableInstanceNeverThrown.java
- 17
- Throwable instance not thrown
- Runtime exception instance <code>new RuntimeException()</code> is not thrown
-
-
-
- ThrowableInstanceNeverThrown.java
- 34
- Throwable instance not thrown
- Runtime exception instance <code>new RuntimeException("throw me")</code> is not thrown
-
-
-
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableInstanceNeverThrownInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableInstanceNeverThrownInspectionTest.java
index 16889dd32041..2240a1c13225 100644
--- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableInstanceNeverThrownInspectionTest.java
+++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableInstanceNeverThrownInspectionTest.java
@@ -1,12 +1,18 @@
package com.siyeh.ig.bugs;
-import com.siyeh.ig.IGInspectionTestCase;
+import com.intellij.codeInspection.InspectionProfileEntry;
+import com.siyeh.ig.LightInspectionTestCase;
+import org.jetbrains.annotations.Nullable;
-public class ThrowableInstanceNeverThrownInspectionTest
- extends IGInspectionTestCase {
+public class ThrowableInstanceNeverThrownInspectionTest extends LightInspectionTestCase {
- public void test() throws Exception {
- doTest("com/siyeh/igtest/bugs/throwable_instance_never_thrown",
- new ThrowableInstanceNeverThrownInspection());
+ public void testThrowableInstanceNeverThrown() {
+ doTest();
+ }
+
+ @Nullable
+ @Override
+ protected InspectionProfileEntry getInspection() {
+ return new ThrowableInstanceNeverThrownInspection();
}
}