6896810: TEST_BUG: java/lang/ref/SoftReference/Pin.java fails with OOME during System.out.println
authorsjohanss
Tue, 30 Jun 2015 17:16:40 +0200
changeset 31466 3c041fe4cc7d
parent 31465 2c323e090b51
child 31467 bdd4f4e915f3
child 31669 40e686692ec4
child 31675 d77c79cba81d
6896810: TEST_BUG: java/lang/ref/SoftReference/Pin.java fails with OOME during System.out.println Reviewed-by: stefank, dholmes, chegar, sjohanss Contributed-by: stefan.sarne@oracle.com
jdk/test/java/lang/ref/SoftReference/Pin.java
--- a/jdk/test/java/lang/ref/SoftReference/Pin.java	Fri Jun 26 19:11:19 2015 -0700
+++ b/jdk/test/java/lang/ref/SoftReference/Pin.java	Tue Jun 30 17:16:40 2015 +0200
@@ -76,6 +76,7 @@
                 Thread.sleep(100);              // yield, for what it's worth
             }
         } catch (OutOfMemoryError e) {
+            chain = null; // Free memory for further work.
             System.err.println("Got OutOfMemoryError, as expected.");
         }