changeset 12311:e29588c63682

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
author sjohanss
date Tue, 30 Jun 2015 17:16:40 +0200
parents be05fd858d23
children 916aab7608cf 3c957e8dc367 3232c06be37c
files test/java/lang/ref/SoftReference/Pin.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/lang/ref/SoftReference/Pin.java	Fri Jun 26 19:11:19 2015 -0700
+++ b/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.");
         }