Skip to content

Commit

Permalink
fix warning about Thread.getID()
Browse files Browse the repository at this point in the history
'The method getId() from the type Thread is deprecated since version 19'
  • Loading branch information
EcljpseB0T authored and jukzi committed Jan 13, 2025
1 parent 3f7070e commit 5ae6f3a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ private static String dumpRunningOrWaitingJobs(List<Job> jobs) {
sb.append(job.getClass().getName());
Thread thread = job.getThread();
if (thread != null) {
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().getThreadInfo(new long[] { thread.getId() }, true, true);
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().getThreadInfo(new long[] {
thread.threadId() }, true, true);
if (threadInfos[0] != null) {
sb.append("\nthread info: ").append(threadInfos[0]);
}
Expand Down

0 comments on commit 5ae6f3a

Please sign in to comment.