Skip to content

Commit

Permalink
create iterator correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Stargazer1998 committed Jan 11, 2024
1 parent 3c1ebd2 commit 422eee4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ public class EmbeddedEngineerParser extends IssueParser {
@Override
public Report parse(final ReaderFactory reader) throws ParsingException {
try (Stream<String> lines = reader.readStream()) {
try {
LookaheadStream lookahead = new LookaheadStream(lines, reader.getFileName());
try (LookaheadStream lookahead = new LookaheadStream(lines, reader.getFileName())) {
return parse(lookahead);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
catch (UncheckedIOException e) {
Expand Down

0 comments on commit 422eee4

Please sign in to comment.