[java-intentions] Test for IDEA-367517

GitOrigin-RevId: 629874907d950626a912c2fbd6c8bb9b50b93902
This commit is contained in:
Tagir Valeev
2025-02-14 13:54:33 +01:00
committed by intellij-monorepo-bot
parent ce3727e1b5
commit b58f63db9e

View File

@@ -0,0 +1,28 @@
// "Add exception to method signature" "false"
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
class Freeze implements Runnable {
private boolean flag;
@Override
public void run() {
try (SomeClient client = new SomeClient()) {
if (flag) {
client.<caret>run1();
} else {
client.run2();
}
}
}
}
class SomeClient implements AutoCloseable {
public void run1() throws InterruptedException, ExecutionException, TimeoutException {}
public void run2() throws InterruptedException, ExecutionException, TimeoutException {}
@Override
public void close() {}
}