Fix ItemResourceOSGiTest on Windows (#1150)

Fixes #1002

Signed-off-by: Wouter Born <github@maindrain.net>
pull/1162/head
Wouter Born 2019-10-22 22:06:09 +02:00 committed by Kai Kreuzer
parent be69d2254e
commit a53e29235b
1 changed files with 1 additions and 6 deletions

View File

@ -14,7 +14,6 @@ package org.eclipse.smarthome.io.rest;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.stream.Stream;
@ -96,11 +95,7 @@ public class Stream2JSONInputStream extends InputStream {
}
IOUtils.closeQuietly(jsonElementStream);
try {
jsonElementStream = IOUtils.toInputStream(prefix + entity + postfix, StandardCharsets.UTF_8.name());
} catch (IOException e) {
// IOException is thrown for invalid encoding. This will never happen with StandardCharsets.UTF_8.
}
jsonElementStream = IOUtils.toInputStream(prefix + entity + postfix);
}
private boolean finished() {