mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make IG test light
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@ public class ReturnFromFinallyBlock
|
||||
}
|
||||
finally
|
||||
{
|
||||
return;
|
||||
<warning descr="'return' inside 'finally' block">return</warning>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ReturnFromFinallyBlock
|
||||
}
|
||||
finally
|
||||
{
|
||||
return 3;
|
||||
<warning descr="'return' inside 'finally' block">return</warning> 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>ReturnFromFinallyBlock.java</file>
|
||||
<line>15</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'return' inside 'finally' block</problem_class>
|
||||
<description><code>return</code> inside 'finally' block #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>ReturnFromFinallyBlock.java</file>
|
||||
<line>27</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'return' inside 'finally' block</problem_class>
|
||||
<description><code>return</code> inside 'finally' block #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+12
-4
@@ -1,10 +1,18 @@
|
||||
package com.siyeh.ig.errorhandling;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.siyeh.ig.LightInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ReturnFromFinallyBlockInspectionTest extends IGInspectionTestCase {
|
||||
public class ReturnFromFinallyBlockInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
doTest("com/siyeh/igtest/errorhandling/return_from_finally_block", new ReturnFromFinallyBlockInspection());
|
||||
public void testReturnFromFinallyBlock() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
return new ReturnFromFinallyBlockInspection();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user