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:
committed by
GitHub
parent
aa3f73d423
commit
1bc55a208b
@@ -32,7 +32,6 @@ import java.time.zone.ZoneRules;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.openhab.binding.airvisualnode.internal.config.AirVisualNodeConfig;
|
||||
import org.openhab.binding.airvisualnode.internal.json.NodeData;
|
||||
import org.openhab.core.library.types.DateTimeType;
|
||||
@@ -178,7 +177,7 @@ public class AirVisualNodeHandler extends BaseThingHandler {
|
||||
String url = "smb://" + nodeAddress + "/" + nodeShareName + "/" + NODE_JSON_FILE;
|
||||
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(null, nodeUsername, nodePassword);
|
||||
try (SmbFileInputStream in = new SmbFileInputStream(new SmbFile(url, auth))) {
|
||||
return IOUtils.toString(in, StandardCharsets.UTF_8.name());
|
||||
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user