mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-18 07:48:19 +07:00
2e7492686e
Fixes IDEA-183139 "String to StringBuilder" quick fix may cause NPE
14 lines
343 B
Java
14 lines
343 B
Java
// "Convert variable 'res' from String to StringBuilder (null-safe)" "true"
|
|
|
|
public class Main {
|
|
String test(String[] strings) {
|
|
String res = null;
|
|
res += "foo";
|
|
for (String s : strings) {
|
|
res+<caret>=", ";
|
|
res+=s;
|
|
}
|
|
return res; // known to be not-null at this point
|
|
}
|
|
}
|