android_mt6572_jiabo/dalvik/dx/tests/115-merge/testdata/TryCatchFinally.java
2025-09-05 16:56:03 +08:00

26 lines
620 B
Java

package testdata;
public class TryCatchFinally {
public static void method() {
int count = 0;
try {
if (true) {
throw new NullPointerException();
}
throw new AssertionError();
} catch (IllegalStateException e) {
throw new AssertionError();
} catch (NullPointerException expected) {
count++;
} catch (RuntimeException e) {
throw new AssertionError();
} finally {
count++;
}
if (count != 2) {
throw new AssertionError();
}
}
}