From f7f51edb424b281f751a9a47ea2397d5cf5b0343 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Wed, 23 Oct 2024 10:46:09 +0200 Subject: [PATCH] Don't warn for deprecated Thread.getId() calls in `ChromeTrace` (#21831) --- compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala b/compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala index c33039f46398..4950f439640f 100644 --- a/compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala +++ b/compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala @@ -45,6 +45,7 @@ final class ChromeTrace(f: Path) extends Closeable { private val traceWriter = FileUtils.newAsyncBufferedWriter(f) private val context = mutable.Stack[JsonContext](TopContext) private val tidCache = new ThreadLocal[String]() { + @annotation.nowarn("cat=deprecation") override def initialValue(): String = "%05d".format(Thread.currentThread().getId()) } objStart()