8289183: jdk.jfr.consumer.RecordedThread.getId references Thread::getId, should be Thread::threadId

Reviewed-by: alanb
This commit is contained in:
Erik Gahlin 2022-07-03 19:28:39 +00:00
parent c4dcce4bca
commit dc4edd3fe8

View File

@ -54,7 +54,7 @@ public final class RecordedThread extends RecordedObject {
/**
* Returns the thread ID used by the operating system.
*
* @return The Java thread ID, or {@code -1} if doesn't exist
* @return the OS thread ID, or {@code -1} if doesn't exist
*/
public long getOSThreadId() {
Long l = getTyped("osThreadId", Long.class, -1L);
@ -86,6 +86,8 @@ public final class RecordedThread extends RecordedObject {
* Returns the Java thread ID, or {@code -1} if it's not a Java thread.
*
* @return the Java thread ID, or {@code -1} if it's not a Java thread
*
* @see java.lang.Thread#threadId()
*/
public long getJavaThreadId() {
Long l = getTyped("javaThreadId", Long.class, -1L);
@ -97,7 +99,10 @@ public final class RecordedThread extends RecordedObject {
* reused within the lifespan of the JVM.
* <p>
* See {@link #getJavaThreadId()} for the ID that is returned by
* {@code java.lang.Thread.getId()}
* {@code java.lang.Thread.threadId()}.
* <p>
* See {@link #getOSThreadId()} for the ID that is returned by
* the operating system.
*
* @return a unique ID for the thread
*/