Skip to content

Commit 2a02b88

Browse files
committed
Small code optimization.
1 parent d764e15 commit 2a02b88

File tree

1 file changed

+3
-2
lines changed
  • scalac-scoverage-runtime/shared/src/main/scala/scoverage

1 file changed

+3
-2
lines changed

scalac-scoverage-runtime/shared/src/main/scala/scoverage/Invoker.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ object Invoker {
3535
// Each thread writes to a separate measurement file, to reduce contention
3636
// and because file appends via FileWriter are not atomic on Windows.
3737
var files = threadFiles.get()
38-
if (files == null)
38+
if (files == null) {
3939
files = ThreadSafeMap.empty[String, FileWriter]
40-
threadFiles.set(files)
40+
threadFiles.set(files)
41+
}
4142
val writer = files.getOrElseUpdate(dataDir, new FileWriter(measurementFile(dataDir), true))
4243
writer.append(id.toString + '\n').flush()
4344

0 commit comments

Comments
 (0)