Skip to content
Snippets Groups Projects
Commit 947744de authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

cahnge to input stream

parent 2365b85a
No related branches found
No related tags found
1 merge request!808Allow Mixed Deployment
package gov.usgs.earthquake.nshmp.www;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Optional;
......@@ -112,9 +112,10 @@ public class SwaggerUIController {
private String getResourceString(String path) throws IOException {
Optional<URL> resource = loader.getResource(path);
resource.get().getContent();
return IOUtils.toString(
(BufferedInputStream) resource.orElseThrow().getContent(),
(InputStream) resource.orElseThrow().getContent(),
StandardCharsets.UTF_8);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment