langtools/test/tools/javac/TryWithResources/TwrSuppression.java

Print this page

        

*** 34,44 **** try (TwrSuppression r1 = new TwrSuppression(false); TwrSuppression r2 = new TwrSuppression(true)) { throw new RuntimeException(); } } catch(RuntimeException e) { ! Throwable[] suppressedExceptions = e.getSuppressedExceptions(); int length = suppressedExceptions.length; if (length != 2) throw new RuntimeException("Unexpected length " + length); if (suppressedExceptions[0].getClass() != Error.class || --- 34,44 ---- try (TwrSuppression r1 = new TwrSuppression(false); TwrSuppression r2 = new TwrSuppression(true)) { throw new RuntimeException(); } } catch(RuntimeException e) { ! Throwable[] suppressedExceptions = e.getSuppressed(); int length = suppressedExceptions.length; if (length != 2) throw new RuntimeException("Unexpected length " + length); if (suppressedExceptions[0].getClass() != Error.class ||