mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 10:51:25 +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:
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
+13
@@ -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