mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
extract method: check duplicates/used vars also in unreachable code
(cherry picked from commit 42249fe8f0cead1a0023aa9edfb23fc52a95c268)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class A {
|
||||
private static final boolean ourOverrideFinalFields = false;
|
||||
|
||||
public static String createShared(char[] chars) {
|
||||
|
||||
if (ourOverrideFinalFields) {
|
||||
String s = newMethod();
|
||||
return s;
|
||||
}
|
||||
String s = newMethod();
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String newMethod() {
|
||||
return new String();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user