Skip to content

Commit

Permalink
closing resources in exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Jun 5, 2013
1 parent cf3cf46 commit 63c2cf0
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -55,6 +55,7 @@ public List<String> retrieveUris(String parentUri) throws IOException {
try {
RDFDataMgr.read(model, parentUri);
} catch (HttpException e) {
stmts.close();
throw new IOException("Unable to fetch uris from " + parentUri,
e);
}
Expand Down Expand Up @@ -94,6 +95,7 @@ public List<DatastreamFixityResult> requestFixityChecks(
sts = model.listStatements(model.createResource(uri),
RdfLexicon.HAS_FIXITY_RESULT, (RDFNode) null);
if (!sts.hasNext()) {
sts.close();
throw new IOException("No fixity information available for " +
uri);
}
Expand Down

0 comments on commit 63c2cf0

Please sign in to comment.