diff options
author | Ignat Beresnev <ignat@beresnev.me> | 2022-01-24 15:56:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 15:56:19 +0300 |
commit | d884fa7ce3088ac9ae0ca1bbad70e698888610fa (patch) | |
tree | b4c22debbc93849d438e4dd7d8b82551a634d744 /core | |
parent | cdebe4038580564fc45ef507303c334b94fbb7eb (diff) | |
download | dokka-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.kt | 5 |
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") + } } } |