mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make another IG test light
This commit is contained in:
+1
-1
@@ -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));
|
||||
|
||||
-9
@@ -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 <code>firstNonNull()</code> not thrown #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+10
-5
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user