< prev index next >

jdk/test/java/util/logging/LoggerSubclass.java

Print this page

        

@@ -90,11 +90,11 @@
     void equal(Object x, Object y) {
         if (x == null ? y == null : x.equals(y)) pass();
         else fail(x + " not equal to " + y);}
     public static void main(String[] args) throws Throwable {
         try {new LoggerSubclass().instanceMain(args);}
-        catch (Throwable e) {throw e.getCause();}}
+        catch (Throwable e) {throw e.getCause() == null ? e : e.getCause();}}
     public void instanceMain(String[] args) throws Throwable {
         try {test(args);} catch (Throwable t) {unexpected(t);}
         System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
         if (failed > 0) throw new AssertionError("Some tests failed");}
 }
< prev index next >