From e6fa274b4a3fb8a8ae55c1e31fb940ce5878604e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 11 Feb 2020 18:01:34 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=94=A5=20Replace=20Guava=E2=80=99s=20ByteS?= =?utf8?q?tream=20method=20with=20Kotlin=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt b/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt index 7ac9e06..4878150 100644 --- a/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/core/SoneInserterTest.kt @@ -4,7 +4,6 @@ import com.codahale.metrics.* import com.google.common.base.* import com.google.common.base.Optional import com.google.common.eventbus.* -import com.google.common.io.ByteStreams.* import com.google.common.util.concurrent.MoreExecutors.* import freenet.keys.* import net.pterodactylus.sone.core.SoneInserter.* @@ -210,7 +209,7 @@ class SoneInserterTest { val manifestElement = manifestCreator.createManifestElement("test.txt", "plain/text; charset=utf-8", "sone-inserter-manifest.txt") assertThat(manifestElement!!.name, equalTo("test.txt")) assertThat(manifestElement.mimeTypeOverride, equalTo("plain/text; charset=utf-8")) - val templateContent = String(toByteArray(manifestElement.data.inputStream), Charsets.UTF_8) + val templateContent = String(manifestElement.data.inputStream.readBytes(), Charsets.UTF_8) assertThat(templateContent, containsString("Sone Version: ${SonePlugin.getPluginVersion()}\n")) assertThat(templateContent, containsString("Core Startup: $now\n")) assertThat(templateContent, containsString("Sone ID: SoneId\n")) -- 2.7.4