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 10, 2025
1 parent 1a3936f commit caa0c12
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 caa0c12

Please sign in to comment.