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 committed Jun 4, 2024
1 parent 8fe6bba commit ed9bc98
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 ed9bc98

Please sign in to comment.