Skip to content

Commit

Permalink
Replaced deprecated and now broken ReaderInputStream constructor call.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jun 12, 2023
1 parent 965e68c commit 59f5929
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/edu/hm/hafner/util/SecureXmlParserFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ public Document readDocument(final Reader reader, final Charset charset) {
}
}

private InputSource createInputSource(final Reader reader, final Charset charset) {
return new InputSource(new ReaderInputStream(reader, charset));
private InputSource createInputSource(final Reader reader, final Charset charset) throws IOException {
var inputStream = ReaderInputStream.builder().setCharset(charset).setReader(reader).get();
return new InputSource(inputStream);
}

/**
Expand Down

0 comments on commit 59f5929

Please sign in to comment.