This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: URLClassLoader update


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

[ TestEarlyGC ]
Tom> I looked a little today and I now agree with you that the source to
Tom> the bytecode would be useful.  I haven't searched for it yet.

Jeff> Oops-- my fault.  I posted that test long ago and since lost the
Jeff> source.

I'm finally checking in your explanation.
I'm putting it on the trunk.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* libjava.loader/TestEarlyGC.java: Added comment explaining
	bytecode.

Index: libjava.loader/TestEarlyGC.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.loader/TestEarlyGC.java,v
retrieving revision 1.1
diff -u -r1.1 TestEarlyGC.java
--- libjava.loader/TestEarlyGC.java 4 Nov 2002 04:17:38 -0000 1.1
+++ libjava.loader/TestEarlyGC.java 28 Jan 2003 23:19:21 -0000
@@ -2,6 +2,18 @@
 
   static TestEarlyGC[] a = new TestEarlyGC[10];
 
+  // Jeff Sturm writes:
+  // Reconstructed from bytecode (and memory).  The singleton pattern
+  // is used as a class finalizer.
+  // public class C {
+  //   private static C c;
+  //   public C() {
+  //     c = this;
+  //   }
+  //   protected void finalize() {
+  //     System.out.println("finalized");
+  //   }
+  // }
   byte[] code = {
     -54,-2,-70,-66,0,3,0,45,0,32,1,0,1,67,7,0,
     1,1,0,16,106,97,118,97,47,108,97,110,103,47,79,98,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]