From 732d181e4908ed0ddc513e305addc71560c0e109 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 26 Aug 2020 16:56:39 +0200 Subject: Let root package be represented as [root] to the user --- plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/base/base-test-utils/src/main/kotlin/utils') diff --git a/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt index 00b865b4..67e62c36 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt @@ -3,6 +3,7 @@ package utils import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.OutputWriter import org.jetbrains.dokka.plugability.DokkaPlugin +import java.util.* class TestOutputWriterPlugin(failOnOverwrite: Boolean = true) : DokkaPlugin() { val writer = TestOutputWriter(failOnOverwrite) @@ -19,7 +20,7 @@ class TestOutputWriterPlugin(failOnOverwrite: Boolean = true) : DokkaPlugin() { class TestOutputWriter(private val failOnOverwrite: Boolean = true) : OutputWriter { val contents: Map get() = _contents - private val _contents = mutableMapOf() + private val _contents = Collections.synchronizedMap(mutableMapOf()) override suspend fun write(path: String, text: String, ext: String) { val fullPath = "$path$ext" _contents.putIfAbsent(fullPath, text)?.also { -- cgit