langtools/test/tools/javac/TryWithResources/TwrSuppression.java
Print this page
@@ -34,11 +34,11 @@
try (TwrSuppression r1 = new TwrSuppression(false);
TwrSuppression r2 = new TwrSuppression(true)) {
throw new RuntimeException();
}
} catch(RuntimeException e) {
- Throwable[] suppressedExceptions = e.getSuppressedExceptions();
+ Throwable[] suppressedExceptions = e.getSuppressed();
int length = suppressedExceptions.length;
if (length != 2)
throw new RuntimeException("Unexpected length " + length);
if (suppressedExceptions[0].getClass() != Error.class ||