On Monday 24 September 2007 12:36:06 Dalibor Topic wrote:
> Andrew John Hughes wrote:
> > On Friday 21 September 2007 23:15:45 Dalibor Topic wrote:
> >> Hi all,
> >>
> >> the attached patch removes a bunch of unused private constructors.
> >>
> >> cheers,
> >> dalibor topic
> >>
> >> 2007-09-21  Dalibor Topic  <[EMAIL PROTECTED]>
> >>
> >>         * gnu/java/rmi/server/RMIClassLoaderImpl.java,
> >>         java/beans/beancontext/BeanContextServicesSupport.java,
> >>         java/lang/management/ThreadInfo.java:
> >>         Removed unused private constructors.
> >
> > Hi Dalibor,
> >
> > Those ThreadInfo constructors aren't used in Classpath, but they are
> > there for VMs to use to create instances of ThreadInfo without creating
> > and then deconstructing a CompositeInfo object.  Can you please put them
> > back?
>
> I won't get around to do it until tonight, so feel free to revert my bad
> change, and add some documentation to the constructors to indicate why
> they are there, and who's using them.
>
> cheers,
> dalibor topic


I've put these changes back; I didn't realise that the original patch only 
removed three of the four constructors.  We can do without the three Dalibor 
discarded as they were just simpler version of the remaining private 
constructor or maintained for legacy (1.5) reasons.  The remaining 
constructor is fine for us by VMs.

2007-10-10  Andrew John Hughes  <[EMAIL PROTECTED]>

        Recommitting patch by Dalibor Topic from 2007-09-21.
        * java/lang/management/ThreadInfo.java:
        Removed unused private constructors.

Sorry for all this trouble,
-- 
Andrew :)

Index: java/lang/management/ThreadInfo.java
===================================================================
RCS file: /sources/classpath/classpath/java/lang/management/ThreadInfo.java,v
retrieving revision 1.11
diff -u -r1.11 ThreadInfo.java
--- java/lang/management/ThreadInfo.java	24 Sep 2007 18:15:24 -0000	1.11
+++ java/lang/management/ThreadInfo.java	10 Oct 2007 11:44:55 -0000
@@ -192,134 +192,6 @@
 
   /**
    * Constructs a new [EMAIL PROTECTED] ThreadInfo} corresponding
-   * to the thread specified.
-   *
-   * @param thread the thread on which the new instance
-   *               will be based.
-   * @param blockedCount the number of times the thread
-   *                     has been blocked.
-   * @param blockedTime the accumulated number of milliseconds
-   *                    the specified thread has been blocked
-   *                    (only used with contention monitoring enabled)
-   * @param lock the monitor lock the thread is waiting for
-   *             (only used if blocked)
-   * @param lockOwner the thread which owns the monitor lock, or
-   *                  <code>null</code> if it doesn't have an owner
-   *                  (only used if blocked)
-   * @param waitedCount the number of times the thread has been in a
-   *                    waiting state.
-   * @param waitedTime the accumulated number of milliseconds the
-   *                   specified thread has been waiting
-   *                   (only used with contention monitoring enabled)
-   * @param isInNative true if the thread is in a native method.
-   * @param isSuspended true if the thread is suspended.
-   * @param trace the stack trace of the thread to a pre-determined
-   *              depth (see VMThreadMXBeanImpl)
-   */
-  private ThreadInfo(Thread thread, long blockedCount, long blockedTime,
-		     Object lock, Thread lockOwner, long waitedCount,
-		     long waitedTime, boolean isInNative, boolean isSuspended,
-		     StackTraceElement[] trace)
-  {
-    this(thread, blockedCount, blockedTime, lock, lockOwner, waitedCount,
-	 waitedTime, isInNative, isSuspended, trace, new MonitorInfo[]{},
-	 new LockInfo[]{});
-  }
-
-  /**
-   * Constructs a new [EMAIL PROTECTED] ThreadInfo} corresponding
-   * to the thread specified.
-   *
-   * @param thread the thread on which the new instance
-   *               will be based.
-   * @param blockedCount the number of times the thread
-   *                     has been blocked.
-   * @param blockedTime the accumulated number of milliseconds
-   *                    the specified thread has been blocked
-   *                    (only used with contention monitoring enabled)
-   * @param lock the monitor lock the thread is waiting for
-   *             (only used if blocked)
-   * @param lockOwner the thread which owns the monitor lock, or
-   *                  <code>null</code> if it doesn't have an owner
-   *                  (only used if blocked)
-   * @param waitedCount the number of times the thread has been in a
-   *                    waiting state.
-   * @param waitedTime the accumulated number of milliseconds the
-   *                   specified thread has been waiting
-   *                   (only used with contention monitoring enabled)
-   * @param isInNative true if the thread is in a native method.
-   * @param isSuspended true if the thread is suspended.
-   * @param trace the stack trace of the thread to a pre-determined
-   *              depth (see VMThreadMXBeanImpl)
-   * @param lockedMonitors an array of [EMAIL PROTECTED] MonitorInfo} objects
-   *                       representing locks held on object monitors
-   *                       by the thread.
-   * @param lockedSynchronizers an array of [EMAIL PROTECTED] LockInfo} objects
-   *                            representing locks held on ownable
-   *                            synchronizers by the thread. 
-   * @since 1.6
-   */
-  private ThreadInfo(Thread thread, long blockedCount, long blockedTime,
-		     Object lock, Thread lockOwner, long waitedCount,
-		     long waitedTime, boolean isInNative, boolean isSuspended,
-		     StackTraceElement[] trace, MonitorInfo[] lockedMonitors,
-		     LockInfo[] lockedSynchronizers)
-  {
-    this(thread.getId(), thread.getName(), thread.getState(), blockedCount, blockedTime,
-         lock == null ? null : lock.getClass().getName() + "@" + 
-	       Integer.toHexString(System.identityHashCode(lock)),
-         lockOwner == null ? -1 : lockOwner.getId(),
-         lockOwner == null ? null : lockOwner.getName(),
-         waitedCount, waitedTime, isInNative, isSuspended,
-	 trace, lockedMonitors, lockedSynchronizers);
-  }
-
-  /**
-   * Constructs a new [EMAIL PROTECTED] ThreadInfo} corresponding
-   * to the thread details specified.
-   *
-   * @param threadId the id of the thread on which this
-   *                 new instance will be based.
-   * @param threadName the name of the thread on which
-   *                 this new instance will be based.
-   * @param threadState the state of the thread on which
-   *                 this new instance will be based.
-   * @param blockedCount the number of times the thread
-   *                     has been blocked.
-   * @param blockedTime the accumulated number of milliseconds
-   *                    the specified thread has been blocked
-   *                    (only used with contention monitoring enabled)
-   * @param lockName the name of the monitor lock the thread is waiting for
-   *                 (only used if blocked)
-   * @param lockOwnerId the id of the thread which owns the monitor
-   *                  lock, or <code>-1</code> if it doesn't have an owner
-   *                  (only used if blocked)
-   * @param lockOwnerName the name of the thread which owns the monitor
-   *                  lock, or <code>null</code> if it doesn't have an 
-   *                  owner (only used if blocked)
-   * @param waitedCount the number of times the thread has been in a
-   *                    waiting state.
-   * @param waitedTime the accumulated number of milliseconds the
-   *                   specified thread has been waiting
-   *                   (only used with contention monitoring enabled)
-   * @param isInNative true if the thread is in a native method.
-   * @param isSuspended true if the thread is suspended.
-   * @param trace the stack trace of the thread to a pre-determined
-   *              depth (see VMThreadMXBeanImpl)
-   */
-  private ThreadInfo(long threadId, String threadName, Thread.State threadState,
-		     long blockedCount, long blockedTime, String lockName, 
-		     long lockOwnerId, String lockOwnerName, long waitedCount,
-		     long waitedTime, boolean isInNative, boolean isSuspended,
-		     StackTraceElement[] trace)
-  {
-    this(threadId, threadName, threadState, blockedCount, blockedTime,
-	 lockName, lockOwnerId, lockOwnerName, waitedCount, waitedTime,
-	 isInNative, isSuspended, trace, new MonitorInfo[]{}, new LockInfo[]{});
-  }
-
-  /**
-   * Constructs a new [EMAIL PROTECTED] ThreadInfo} corresponding
    * to the thread details specified.
    *
    * @param threadId the id of the thread on which this

Reply via email to