mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
local can be final: don't ignore problems found in lambda body (IDEA-145500)
This commit is contained in:
@@ -2,13 +2,21 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Junk.java</file>
|
||||
<line>4</line>
|
||||
<line>6</line>
|
||||
<entry_point TYPE="method" FQNAME="Issue void filterMap()" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Local variable or parameter can be final</problem_class>
|
||||
<description>Variable <code>cc</code> can have <code>final</code> modifier</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>Junk.java</file>
|
||||
<line>14</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Local variable or parameter can be final</problem_class>
|
||||
<description>Variable <code>i</code> can have <code>final</code> modifier</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>Junk.java</file>
|
||||
<line>3</line>
|
||||
<line>13</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Local variable or parameter can be final</problem_class>
|
||||
<description>Variable <code>r</code> can have <code>final</code> modifier</description>
|
||||
</problem>
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
import java.util.HashMap;
|
||||
|
||||
class Issue {
|
||||
public static void filterMap() {
|
||||
new HashMap<String, String>().forEach((s1, s2) -> {
|
||||
String cc = s1 + s2;
|
||||
System.err.println(cc);
|
||||
});
|
||||
}
|
||||
}
|
||||
public final class Junk {
|
||||
public void sillyMethod() {
|
||||
Runnable r = () -> {
|
||||
|
||||
Reference in New Issue
Block a user