aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat@beresnev.me>2022-01-24 15:56:19 +0300
committerGitHub <noreply@github.com>2022-01-24 15:56:19 +0300
commitd884fa7ce3088ac9ae0ca1bbad70e698888610fa (patch)
treeb4c22debbc93849d438e4dd7d8b82551a634d744 /core
parentcdebe4038580564fc45ef507303c334b94fbb7eb (diff)
downloaddokka-d884fa7ce3088ac9ae0ca1bbad70e698888610fa.tar.gz
dokka-d884fa7ce3088ac9ae0ca1bbad70e698888610fa.tar.bz2
dokka-d884fa7ce3088ac9ae0ca1bbad70e698888610fa.zip
Close Input/Output streams (#2319)
* Close Input/Output streams
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/DokkaVersion.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/kotlin/DokkaVersion.kt b/core/src/main/kotlin/DokkaVersion.kt
index 410058f3..58dd0310 100644
--- a/core/src/main/kotlin/DokkaVersion.kt
+++ b/core/src/main/kotlin/DokkaVersion.kt
@@ -4,7 +4,8 @@ import java.util.*
object DokkaVersion {
val version: String by lazy {
- val stream = javaClass.getResourceAsStream("/META-INF/dokka/dokka-version.properties")
- Properties().apply { load(stream) }.getProperty("dokka-version")
+ javaClass.getResourceAsStream("/META-INF/dokka/dokka-version.properties").use { stream ->
+ Properties().apply { load(stream) }.getProperty("dokka-version")
+ }
}
}