set Thread.blocker during thread construction

This avoids an NPE in Thread.blockedOn.
This commit is contained in:
Joel Dice 2011-03-31 18:58:59 -06:00
parent 6506760dd9
commit 916e6787de

View File

@ -309,6 +309,9 @@ class MyClasspath : public Classpath {
PROTECT(t, thread);
object blockerLock = makeJobject(t);
set(t, thread, ThreadBlockerLock, blockerLock);
const unsigned BufferSize = 256;
char buffer[BufferSize];
unsigned length = vm::snprintf(buffer, BufferSize, "Thread-%p", thread);