Anthony Green wrote:
Oh, right.  I guess we can just get rid of the tid == null test all
together.

Yeah, that's all I did. VMIdManager.readObjectId will throw InvalidObjectException if the debugger attempts to use an invalid ID (so tid can not be null in the constructors of these two classes).

Keith - maybe I'll just leave this for you to figure out the right
solution.

I've committed the obvious patch (attached for whatever it may be worth).

Keith

ChangeLog
2005-09-22  Keith Seitz  <[EMAIL PROTECTED]>

* gnu/classpath/jdwp/event/filters/StepFilter.java (StepFilter): Do not test for null thread ID -- just test if it has not been garbage collected. * gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java (ThreadOnlyFilter):
        Likewise.

Index: gnu/classpath/jdwp/event/filters/StepFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/classpath/jdwp/event/filters/StepFilter.java,v
retrieving revision 1.1
diff -u -p -r1.1 StepFilter.java
--- gnu/classpath/jdwp/event/filters/StepFilter.java	26 Aug 2005 21:52:28 -0000	1.1
+++ gnu/classpath/jdwp/event/filters/StepFilter.java	22 Sep 2005 18:55:23 -0000
@@ -66,7 +66,7 @@ public class StepFilter
   public StepFilter (ThreadId tid, int size, int depth)
     throws InvalidThreadException
   {
-    if (tid == null | tid.getReference().get () == null)
+    if (tid.getReference().get () == null)
       throw new InvalidThreadException (tid.getId ());
 
     _tid = tid;
Index: gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java,v
retrieving revision 1.1
diff -u -p -r1.1 ThreadOnlyFilter.java
--- gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java	26 Aug 2005 21:52:28 -0000	1.1
+++ gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java	22 Sep 2005 18:55:23 -0000
@@ -66,7 +66,7 @@ public class ThreadOnlyFilter
   public ThreadOnlyFilter (ThreadId tid)
     throws InvalidThreadException
   {
-    if (tid == null | tid.getReference().get () == null)
+    if (tid.getReference().get () == null)
       throw new InvalidThreadException (tid.getId ());
 
     _tid = tid;
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to