Skip to content

Commit

Permalink
Merge pull request #124 from cleydyr/issue-110
Browse files Browse the repository at this point in the history
[110] feche explicitamente o arquivo
  • Loading branch information
cleydyr authored Jul 31, 2019
2 parents 7892012 + 7f5e0be commit 8a57d74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/main/java/biblivre/core/file/BiblivreFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,4 @@ public void copy(OutputStream out) throws IOException {
public abstract boolean exists();

public abstract void copy(OutputStream out, long start, long size) throws IOException;

@Override
protected void finalize() throws Throwable {
this.close();
super.finalize();
}
}
2 changes: 2 additions & 0 deletions src/main/java/biblivre/digitalmedia/Handler.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public void download(ExtendedRequest request, ExtendedResponse response) {
}

this.setFile(file);

this.setCallback(file::close);
}

public void upload(ExtendedRequest request, ExtendedResponse response) {
Expand Down

0 comments on commit 8a57d74

Please sign in to comment.