Skip to content

Commit

Permalink
Don't warn for deprecated Thread.getId() calls in ChromeTrace (#21831)
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur authored Oct 23, 2024
1 parent ecc332f commit f7f51ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/profile/ChromeTrace.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f7f51ed

Please sign in to comment.