diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/A.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/A.java index 488651f5481b..3e25ccbfecc1 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/A.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/A.java @@ -5,7 +5,7 @@ package com.siyeh.igtest.bugs.throwable_result_of_method_call_ignored; public class A { public static void test() { try { - firstNonNull(new Throwable(), null); + firstNonNull(new Throwable(), null); } catch (Exception e) { throw new RuntimeException(firstNonNull(e.getCause(), e)); diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/expected.xml deleted file mode 100644 index a02d25eb9ecf..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored/expected.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - A.java - 8 - Throwable result of method call ignored - Result of <code>firstNonNull()</code> not thrown #loc - - \ No newline at end of file diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableResultOfMethodCallIgnoredInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableResultOfMethodCallIgnoredInspectionTest.java index 9f021f563e77..adeb8aeca497 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableResultOfMethodCallIgnoredInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/ThrowableResultOfMethodCallIgnoredInspectionTest.java @@ -1,12 +1,17 @@ package com.siyeh.ig.bugs; +import com.intellij.codeInspection.InspectionProfileEntry; import com.siyeh.ig.IGInspectionTestCase; +import com.siyeh.ig.LightInspectionTestCase; -public class ThrowableResultOfMethodCallIgnoredInspectionTest - extends IGInspectionTestCase { +public class ThrowableResultOfMethodCallIgnoredInspectionTest extends LightInspectionTestCase { - public void test() throws Exception { - doTest("com/siyeh/igtest/bugs/throwable_result_of_method_call_ignored", - new ThrowableResultOfMethodCallIgnoredInspection()); + public void testA() throws Exception { + doTest(); + } + + @Override + protected InspectionProfileEntry getInspection() { + return new ThrowableResultOfMethodCallIgnoredInspection(); } }