/[classpath]/classpath/gnu/classpath/jdwp/id/ThreadId.java
ViewVC logotype

Diff of /classpath/gnu/classpath/jdwp/id/ThreadId.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.1 by gnu_andrew, Tue Aug 2 20:12:08 2005 UTC revision 1.2.2.2 by gnu_andrew, Sat Sep 10 15:31:36 2005 UTC
# Line 40  exception statement from your version. * Line 40  exception statement from your version. *
40  package gnu.classpath.jdwp.id;  package gnu.classpath.jdwp.id;
41    
42  import gnu.classpath.jdwp.JdwpConstants;  import gnu.classpath.jdwp.JdwpConstants;
43    import gnu.classpath.jdwp.exception.InvalidThreadException;
44    
45  /**  /**
46   * A class which represents a JDWP thread id   * A class which represents a JDWP thread id
# Line 61  public class ThreadId Line 62  public class ThreadId
62    {    {
63      super (JdwpConstants.Tag.THREAD);      super (JdwpConstants.Tag.THREAD);
64    }    }
65    
66      /**
67       * Gets the Thread represented by this ID
68       *
69       * @throws InvalidThreadException if thread is garbage collected,
70       *           exited, or otherwise invalid
71       */
72      public Thread getThread ()
73        throws InvalidThreadException
74      {
75        Thread thread = (Thread) _reference.get ();
76    
77        /* Spec says if thread is null, not valid, or exited,
78           throw invalid thread */
79        // FIXME: not valid? exited? Is this check valid?
80        if (thread == null || !thread.isAlive ())
81          throw new InvalidThreadException (getId ());
82    
83        return thread;
84      }
85  }  }

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26