Skip to content

Commit

Permalink
Merge pull request opensearch-project#31 from khushbr/feature/spotbug…
Browse files Browse the repository at this point in the history
…-fix

Addressing the spotbug failure
  • Loading branch information
khushbr authored Jul 14, 2021
2 parents 5b41dd0 + bdbf080 commit 862fc67
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ private void readInternal(Path pathToFile, int bufferSize, EventDispatcher proce
public void deleteAllFiles() {
LOG.debug("Cleaning up any leftover files.");
File root = new File(metricsLocation);
// Filter out '.tmp' files, we do not want to delete currBucket .tmp files
String[] filesToDelete = root.list((dir, name) -> !name.endsWith(TMP_FILE_EXT));
String[] filesToDelete = root.list();
if (filesToDelete == null) {
return;
}
deleteFiles(Arrays.asList(filesToDelete));
}

Expand Down

0 comments on commit 862fc67

Please sign in to comment.