Removed usage to IOUtils.toString (#8579)

Specifically the toString reading from inputstream.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
This commit is contained in:
Hilbrand Bouwkamp
2020-09-25 20:46:14 +02:00
committed by GitHub
parent aa3f73d423
commit 1bc55a208b
13 changed files with 46 additions and 43 deletions

View File

@@ -14,8 +14,7 @@ package org.openhab.binding.yamahareceiver.internal;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import java.nio.charset.StandardCharsets;
/**
* Helper for loading XML files from classpath.
@@ -29,7 +28,7 @@ public class ResponseLoader {
if (in == null) {
return null;
}
return IOUtils.toString(in);
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
}
}