Files
openide/java/java-tests/testData/refactoring/extractMethodAndDuplicatesInplace/RuntimeCatchWithLastAssignment_after.java
Alexandr Suhinin 820529b67a [extract duplicates]: copy existing tests
GitOrigin-RevId: 0cf0aa8d5875e2bc52dfaa96c1259ccb314bbd96
2021-07-23 12:16:23 +00:00

18 lines
304 B
Java

public class Test {
public int test(int x) {
int y = 42;
try {
y = getY(x, y);
} catch (ArithmeticException e) {
}
return y;
}
private int getY(int x, int y) {
foo();
y = y / x;
return y;
}
void foo() {}
}