make another IG test light

This commit is contained in:
Bas Leijdekkers
2014-06-26 16:06:59 +02:00
parent a6d8d9b62e
commit 5e5f685dad
3 changed files with 11 additions and 15 deletions
@@ -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);
<warning descr="Result of 'firstNonNull()' not thrown">firstNonNull</warning>(new Throwable(), null);
}
catch (Exception e) {
throw new RuntimeException(firstNonNull(e.getCause(), e));
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>8</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Throwable result of method call ignored</problem_class>
<description>Result of &lt;code&gt;firstNonNull()&lt;/code&gt; not thrown #loc</description>
</problem>
</problems>
@@ -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();
}
}