summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/033-class-init-deadlock/src/Main.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/033-class-init-deadlock/src/Main.java b/test/033-class-init-deadlock/src/Main.java
index 3346aa6813..bd4d4ab7b5 100644
--- a/test/033-class-init-deadlock/src/Main.java
+++ b/test/033-class-init-deadlock/src/Main.java
@@ -36,7 +36,8 @@ public class Main {
thread1.start();
thread2.start();
- try { barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { barrier.await(); } catch (Exception e) { System.out.println(e); }
try { Thread.sleep(6000); } catch (InterruptedException ie) { }
System.out.println("Deadlock test interrupting threads.");
@@ -51,7 +52,8 @@ public class Main {
class A {
static {
- try { Main.barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { Main.barrier.await(); } catch (Exception e) { System.out.println(e); }
new B();
System.out.println("A initialized");
Main.aInitialized = true;
@@ -60,7 +62,8 @@ class A {
class B {
static {
- try { Main.barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { Main.barrier.await(); } catch (Exception e) { System.out.println(e); }
new A();
System.out.println("B initialized");
Main.bInitialized = true;