Skip to content

Commit

Permalink
Stop using deprecated Thread.getId
Browse files Browse the repository at this point in the history
Use Thread.threadId instead.
  • Loading branch information
akurtakov committed Dec 18, 2024
1 parent 3c99122 commit 0d51f20
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2021 IBM Corporation and others.
* Copyright (c) 2008, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -201,7 +201,7 @@ private static String dumpRunningOrWaitingJobs(List<Job> jobs) {
Thread thread = job.getThread();
if (thread != null) {
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean()
.getThreadInfo(new long[] { thread.getId() }, true, true);
.getThreadInfo(new long[] { thread.threadId() }, true, true);
if (threadInfos[0] != null) {
sb.append("\nthread info: ").append(threadInfos[0]);
}
Expand Down

0 comments on commit 0d51f20

Please sign in to comment.