@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; JavaStackFrame that = (JavaStackFrame) o; if (myIndex != that.myIndex) return false; if (!myThreadReference.equals(that.myThreadReference)) return false; return true; }
public static void removeThread(ThreadReference thread) { if (thread.equals(ThreadInfo.current)) { // Current thread has died. // Be careful getting the thread name. If its death happens // as part of VM termination, it may be too late to get the // information, and an exception will be thrown. String currentThreadName; try { currentThreadName = "\"" + thread.name() + "\""; } catch (Exception e) { currentThreadName = ""; } setCurrentThread(null); err.println( String.format("%s, Current thread died. Execution continuing...", currentThreadName)); } threads.remove(getThreadInfo(thread)); }