Skip to content

Commit

Permalink
#239 close input stream
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Dec 6, 2023
1 parent a5ed797 commit dd116b3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public void triplify(Properties properties, FacadeXGraphBuilder builder) throws

builder.addRoot(dataSourceId);

InputStream is = url.openStream();
try (XWPFDocument document = new XWPFDocument(is)) {
try (InputStream is = url.openStream(); XWPFDocument document = new XWPFDocument(is)) {
List<XWPFParagraph> paragraphs = document.getParagraphs();

builder.addType(dataSourceId, SPARQLAnythingConstants.ROOT_ID, "Document");
Expand Down Expand Up @@ -149,7 +148,6 @@ public void triplify(Properties properties, FacadeXGraphBuilder builder) throws
}
}

is.close();
}

@Override
Expand Down

0 comments on commit dd116b3

Please sign in to comment.