classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Patch: FYI: fix for constructor oddity


From: Tom Tromey
Subject: [cp-patches] Patch: FYI: fix for constructor oddity
Date: 17 Sep 2004 19:52:18 -0600

I'm checking this in on the trunk.  This fixes a small oddity in
VMProcess, which I think is adequately well explained by the comment I
added.

Basically, use of "private" is strange sometimes, it is best to avoid
it when you have accesses that cross inner/outer boundaries.

Tom

2004-09-17  Tom Tromey  <address@hidden>

        * vm/reference/java/lang/VMProcess.java (ProcessThread): Added
        explicit constructor.

Index: vm/reference/java/lang/VMProcess.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMProcess.java,v
retrieving revision 1.2
diff -u -r1.2 VMProcess.java
--- vm/reference/java/lang/VMProcess.java 7 May 2004 09:16:49 -0000 1.2
+++ vm/reference/java/lang/VMProcess.java 18 Sep 2004 01:50:53 -0000
@@ -111,6 +111,14 @@
     // Only used in run() and spawn() method from this Thread, so no locking.
     private final HashMap activeMap = new HashMap();
 
+    // We have an explicit constructor, because the default
+    // constructor will be private, which means the compiler will have
+    // to generate a second package-private constructor, which is
+    // bogus.
+    public ProcessThread ()
+    {
+    }
+
     public void run()
     {
       final LinkedList workList = VMProcess.workList;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]