diff options
Diffstat (limited to 'plugins/base/base-test-utils/src/main/kotlin/utils')
-rw-r--r-- | plugins/base/base-test-utils/src/main/kotlin/utils/TestOutputWriter.kt | 3 |
1 files changed, 2 insertions, 1 deletions
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<String, String> get() = _contents - private val _contents = mutableMapOf<String, String>() + private val _contents = Collections.synchronizedMap(mutableMapOf<String, String>()) override suspend fun write(path: String, text: String, ext: String) { val fullPath = "$path$ext" _contents.putIfAbsent(fullPath, text)?.also { |