mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
AssignFieldFromParameterAction: check whether final field is already initialized
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Assign Parameter to Field 'myStr'" "true"
|
||||
|
||||
|
||||
class Foo1 {
|
||||
final String myStr;
|
||||
Foo1(String str) {
|
||||
myStr = str;
|
||||
if(Math.random() > 0.5) {
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Assign Parameter to Field 'myStr'" "false"
|
||||
|
||||
|
||||
class Foo1 {
|
||||
final String myStr;
|
||||
Foo1(String s<caret>tr) {
|
||||
if(Math.random() > 0.5) {
|
||||
myStr = "foo";
|
||||
} else {
|
||||
myStr = "bar";
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Assign Parameter to Field 'myStr'" "true"
|
||||
|
||||
|
||||
class Foo1 {
|
||||
final String myStr;
|
||||
Foo1(String s<caret>tr) {
|
||||
if(Math.random() > 0.5) {
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user