Skip to content

Commit

Permalink
QuicklinksViewer: finally close FileOutputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T authored and jukzi committed Jun 19, 2023
1 parent a5ffa3a commit 14be100
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@ private String asDataURL(ImageDescriptor descriptor) {
}
try {
File tempFile = File.createTempFile("qlink", "png"); //$NON-NLS-1$ //$NON-NLS-2$
FileOutputStream fos = new FileOutputStream(tempFile);
fos.write(output.toByteArray());
fos.close();
try (FileOutputStream fos = new FileOutputStream(tempFile)){
fos.write(output.toByteArray());
}
tempFile.deleteOnExit();
return tempFile.toURI().toString();
} catch (IOException e) {
Expand Down

0 comments on commit 14be100

Please sign in to comment.