Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import javax.json.JsonReader;
import javax.json.JsonReaderFactory;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

Expand Down Expand Up @@ -68,8 +69,10 @@ public Config getConfig() {
* @param stream the InputStream for the schema.
* @return the read schema.
*/
protected JsonSchema readSchema(InputStream stream) {
try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(stream)) {
protected JsonSchema readSchema(InputStream stream) throws Exception{
byte[] bytes = stream.readAllBytes();
InputStream jsonStream = new ByteArrayInputStream(bytes);
try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(jsonStream)) {
return reader.read();
}
}
Expand Down