1.1 --- a/samples/gc/test/org/apidesign/gc/WeakListenersTest.java Tue Aug 12 13:28:44 2008 +0200
1.2 +++ b/samples/gc/test/org/apidesign/gc/WeakListenersTest.java Tue Aug 12 13:47:15 2008 +0200
1.3 @@ -48,6 +48,11 @@
1.4 ex.printStackTrace();
1.5 // of course it cannot be garbage collected. That is OK.
1.6 return;
1.7 + } catch (OutOfMemoryError ex) {
1.8 + ex.printStackTrace();
1.9 + // sometimes the test fails on OOME, let's catch it
1.10 + // of course it cannot be garbage collected. That is OK.
1.11 + return;
1.12 }
1.13 fail("The listener cannot be GCed as it is held from long living JavaBean");
1.14 }