The JDWP 1.6 specification at:
states as follows:
INVALID_THREAD Passed thread is null, is not a valid thread or has exited.
However, test shows that if passed thread reference is null then the ThreadReference.OwnedMonitorsStackDepthInfo command
returns NOT_SUSPENDED error code instead of INVALID_THREAD.
Note that this command returns correct INVALID_THREAD error code:
- for non-thread object reference (not a valid thread)
- for a thread which has exited but was suspended before.