mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
field can be local extended: suggest read only fields used in e.g. constructor once as can be local; process inner class constructors as methods (IDEA-52670)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems/>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Outer {
|
||||
private int value = 0;
|
||||
|
||||
public class Inner {
|
||||
private final int myValue;
|
||||
|
||||
public Inner() {
|
||||
myValue = value++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>2</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Field can be local</problem_class>
|
||||
<description>Field can be converted to a local variable</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1,11 @@
|
||||
public class Outer {
|
||||
private int value = 0;
|
||||
|
||||
public class Inner {
|
||||
private final int myValue;
|
||||
|
||||
public Inner() {
|
||||
myValue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user