Small change to ThreadOnlyFilter to avoid a null pointer exception with null ThreadId. Throws an invalid thread exception instead.

Thanks,
Kyle

2006-06-16  Kyle Galloway <[EMAIL PROTECTED]>

     * gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java:
     Added check for null ThreadId to avoid null pointer
     exception.



Index: ThreadOnlyFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java,v
retrieving revision 1.4
diff -u -r1.4 ThreadOnlyFilter.java
--- ThreadOnlyFilter.java	12 Jun 2006 19:43:26 -0000	1.4
+++ ThreadOnlyFilter.java	16 Jun 2006 14:37:41 -0000
@@ -65,7 +65,7 @@
   public ThreadOnlyFilter (ThreadId tid)
     throws InvalidThreadException
   {
-    if (tid.getReference().get () == null)
+    if (tid == null || tid.getReference().get () == null)
       throw new InvalidThreadException (tid.getId ());
 
     _tid = tid;

Reply via email to