mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
field can be local: restrict check for only super/this call (IDEA-152331)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// "Convert to local" "true"
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
class FieldCanBeLocalTest extends JPanel {
|
||||
|
||||
public FieldCanBeLocalTest() {
|
||||
super();
|
||||
String name = "MyName";
|
||||
setName(name);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Convert to local" "true"
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
class FieldCanBeLocalTest extends JPanel {
|
||||
|
||||
private String na<caret>me = "MyName";
|
||||
|
||||
public FieldCanBeLocalTest() {
|
||||
super();
|
||||
setName(name);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {}
|
||||
}
|
||||
Reference in New Issue
Block a user