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
@@ -18,6 +18,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
@@ -27,7 +28,6 @@ import java.util.Optional;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.spotify.internal.api.exception.SpotifyException;
|
||||
@@ -107,7 +107,7 @@ public class SpotifyAuthService {
|
||||
String.format("Cannot find '{}' - failed to initialize Spotify servlet", templateName));
|
||||
} else {
|
||||
try (InputStream inputStream = index.openStream()) {
|
||||
return IOUtils.toString(inputStream);
|
||||
return new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user