From 01295a86926d78ef8b2ba8caf910567d78c3d528 Mon Sep 17 00:00:00 2001 From: Jaime Wren Date: Mon, 18 Aug 2025 23:38:10 -0700 Subject: [PATCH] Java deprecation migration, Thread#getID() -> Thread#threadId() This reduces the number of deprecated API usages by the verifier violations by 2. https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/Thread.html --- .../dart/ide/runner/server/vmService/VmServiceWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/src/main/java/com/jetbrains/lang/dart/ide/runner/server/vmService/VmServiceWrapper.java b/third_party/src/main/java/com/jetbrains/lang/dart/ide/runner/server/vmService/VmServiceWrapper.java index 034478465..b8ba97ad9 100644 --- a/third_party/src/main/java/com/jetbrains/lang/dart/ide/runner/server/vmService/VmServiceWrapper.java +++ b/third_party/src/main/java/com/jetbrains/lang/dart/ide/runner/server/vmService/VmServiceWrapper.java @@ -85,7 +85,7 @@ private void addRequest(@NotNull Runnable runnable) { private void assertSyncRequestAllowed() { ThreadingAssertions.assertBackgroundThread(); ThreadingAssertions.assertNoReadAccess(); - if (myVmServiceReceiverThreadId == Thread.currentThread().getId()) { + if (myVmServiceReceiverThreadId == Thread.currentThread().threadId()) { LOG.error("Synchronous requests must not be made in Web Socket listening thread: answer will never be received"); } } @@ -94,7 +94,7 @@ public void handleDebuggerConnected() { streamListen(VmService.DEBUG_STREAM_ID, new VmServiceConsumers.SuccessConsumerWrapper() { @Override public void received(final Success success) { - myVmServiceReceiverThreadId = Thread.currentThread().getId(); + myVmServiceReceiverThreadId = Thread.currentThread().threadId(); streamListen(VmService.ISOLATE_STREAM_ID, new VmServiceConsumers.SuccessConsumerWrapper() { @Override public void received(final Success success) {