mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
MoveFieldAssignmentToInitializerInspection: allow unknown methods
As this is intention-like part of inspection (no warning), we can allow it even if we are not sure that semantics will be preserved. See comments in IDEA-177602
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// "Move assignment to field declaration" "INFORMATION"
|
||||
public class Test {
|
||||
String myField = getValue();
|
||||
private String value;
|
||||
|
||||
void f() {
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value+value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Move assignment to field declaration" "INFORMATION"
|
||||
public class Test {
|
||||
String myField;
|
||||
private String value;
|
||||
|
||||
void f() {
|
||||
<caret>myField = getValue();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value+value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user