mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 10:21:05 +07:00
[extract method] IDEA-251837 fix texts GitOrigin-RevId: 37da2e7e8f83a4d85a87c644788a66ce6ea1e05f
25 lines
513 B
Java
25 lines
513 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.concurrent.ThreadLocalRandom;
|
|
|
|
public class A {
|
|
void f() {
|
|
String s = "";
|
|
try {
|
|
s = "a";
|
|
s = newMethod(s);
|
|
} finally {
|
|
System.out.println(s);
|
|
}
|
|
}
|
|
|
|
private @NotNull String newMethod(String s) {
|
|
if (r()) throw new RuntimeException();
|
|
s = "b";
|
|
return s;
|
|
}
|
|
|
|
private boolean r() {
|
|
return ThreadLocalRandom.current().nextBoolean();
|
|
}
|
|
} |