Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit dc4edd3

Browse files
committed
8289183: jdk.jfr.consumer.RecordedThread.getId references Thread::getId, should be Thread::threadId
Reviewed-by: alanb
1 parent c4dcce4 commit dc4edd3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedThread.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public String getOSName() {
5454
/**
5555
* Returns the thread ID used by the operating system.
5656
*
57-
* @return The Java thread ID, or {@code -1} if doesn't exist
57+
* @return the OS thread ID, or {@code -1} if doesn't exist
5858
*/
5959
public long getOSThreadId() {
6060
Long l = getTyped("osThreadId", Long.class, -1L);
@@ -86,6 +86,8 @@ public String getJavaName() {
8686
* Returns the Java thread ID, or {@code -1} if it's not a Java thread.
8787
*
8888
* @return the Java thread ID, or {@code -1} if it's not a Java thread
89+
*
90+
* @see java.lang.Thread#threadId()
8991
*/
9092
public long getJavaThreadId() {
9193
Long l = getTyped("javaThreadId", Long.class, -1L);
@@ -97,7 +99,10 @@ public long getJavaThreadId() {
9799
* reused within the lifespan of the JVM.
98100
* <p>
99101
* See {@link #getJavaThreadId()} for the ID that is returned by
100-
* {@code java.lang.Thread.getId()}
102+
* {@code java.lang.Thread.threadId()}.
103+
* <p>
104+
* See {@link #getOSThreadId()} for the ID that is returned by
105+
* the operating system.
101106
*
102107
* @return a unique ID for the thread
103108
*/

0 commit comments

Comments
 (0)