Skip to content

Commit

Permalink
Fix SpotBugs warning
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed May 3, 2019
1 parent 5c026aa commit 151b447
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,10 @@ public void write(File file) throws Exception {
* desired file.
*/
if (file.exists()) {
file.delete();
if (!file.delete()) {
throw new FileUploadException(
"Cannot write uploaded file to disk!");
}
}
if (!outputFile.renameTo(file)) {
BufferedInputStream in = null;
Expand Down

0 comments on commit 151b447

Please sign in to comment.