Skip to content

Commit

Permalink
Fixed null pointer exception when tmp file fails to create
Browse files Browse the repository at this point in the history
  • Loading branch information
awrigh11 committed Dec 23, 2024
1 parent 1b968ba commit fecd3c4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ public void update() {
writeCacheFile(fs, tempFile);
createCacheFile(fs, tempFile);
} catch (IOException e) {
cleanup(fs, tempFile);
if (tempFile != null){
cleanup(fs, tempFile);
}

log.error("Unable to update cache file " + cacheFilePath + ". " + e.getMessage());
log.error("Unable to update cache file " + cacheFilePath + ". " + e.getMessage(), e);
}

}
Expand Down

0 comments on commit fecd3c4

Please sign in to comment.