From 307f4252fa18f674346c4288d6fef935a655ff62 Mon Sep 17 00:00:00 2001 From: Anirvan Sarkar Date: Wed, 28 Feb 2024 02:19:07 +0900 Subject: [PATCH] Replace Thread.currentThread().getId() with Thread.currentThread().threadId() --- .../src/main/java/com/sun/javafx/logging/PrintLogger.java | 4 ++-- .../main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/javafx.base/src/main/java/com/sun/javafx/logging/PrintLogger.java b/modules/javafx.base/src/main/java/com/sun/javafx/logging/PrintLogger.java index 26297223aad..5f809309cbc 100644 --- a/modules/javafx.base/src/main/java/com/sun/javafx/logging/PrintLogger.java +++ b/modules/javafx.base/src/main/java/com/sun/javafx/logging/PrintLogger.java @@ -271,7 +271,7 @@ public void addMessage(String message) { } pulseData.message .append("T") - .append(Thread.currentThread().getId()) + .append(Thread.currentThread().threadId()) .append(" : ") .append(message) .append("\n"); @@ -315,7 +315,7 @@ public void newPhase(String name) { if (pulseData != null) { pulseData.message .append("T") - .append(Thread.currentThread().getId()) + .append(Thread.currentThread().threadId()) .append(" (").append((curPhase.phaseStart-pulseData.startTime)/1000000L) .append(" +").append((curTime - curPhase.phaseStart)/1000000L).append("ms): ") .append(curPhase.phaseName) diff --git a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java index d732e4696d3..3ad61058cae 100644 --- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java +++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java @@ -189,7 +189,7 @@ private static boolean isDebug() private static void mlog(String msg) { if (log.isLoggable(Level.FINE)) { log.fine("PID:" + Long.toHexString(PID) - + " TID:" + Thread.currentThread().getId() + + " TID:" + Thread.currentThread().threadId() + "(" + Thread.currentThread().getName() + ") " + msg); }