8200123: Replace Thread.init with telescoping constructor

Reviewed-by: dholmes, mchung, plevart
This commit is contained in:
Martin Buchholz 2018-03-29 16:23:35 -07:00
parent 200fb2b35b
commit 1cd649af57
2 changed files with 25 additions and 34 deletions

View file

@ -412,11 +412,11 @@ public class LockSupport {
/**
* Returns the thread id for the given thread. We must access
* this directly rather than via method Thread.getId() because
* getId() is not final, and has been known to be overridden in
* ways that do not preserve unique mappings.
* getId() has been known to be overridden in ways that do not
* preserve unique mappings.
*/
static final long getThreadId(Thread thread) {
return U.getLongVolatile(thread, TID);
return U.getLong(thread, TID);
}
// Hotspot implementation via intrinsics API