harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r518537 - /harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java
Date Thu, 15 Mar 2007 09:20:13 GMT
Author: varlax
Date: Thu Mar 15 02:20:12 2007
New Revision: 518537

URL: http://svn.apache.org/viewvc?view=rev&rev=518537
Log:
Applied HARMONY-3378 [drlvm][jit][opt] smoke test gc.PhantomReferenceTest fails in OPT mode.

Modified:
    harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java?view=diff&rev=518537&r1=518536&r2=518537
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/smoke/gc/PhantomReferenceTest.java Thu Mar 15 02:20:12
2007
@@ -31,10 +31,14 @@
  */
 public class PhantomReferenceTest {
 
+    // declare 'ref' static to be sure that it is not cleared
+    // due to all its methods are inlined
+    static Reference ref;
+
     public static void main(String[] args) throws Exception {
         ReferenceQueue queue = new ReferenceQueue();
         Object referent = new PhantomReferenceTest();
-        Reference ref = new PhantomReference(referent, queue);
+        ref = new PhantomReference(referent, queue);
 
         // drop strong reference
         referent = null;



Mime
View raw message