Skip to content
Permalink
Browse files
nodetool enablefullquerylog can NPE when directory has no files
patch by David Capwell; reviewed by Jon Meredith for CASSANDRA-17595
  • Loading branch information
David Capwell committed May 4, 2022
1 parent 3b648ca commit 559b17f71d3207158d34b1dd2414a531e362af20
Showing 2 changed files with 5 additions and 2 deletions.
@@ -1,4 +1,5 @@
4.1
* nodetool enablefullquerylog can NPE when directory has no files (CASSANDRA-17595)
* Add auto_snapshot_ttl configuration (CASSANDRA-16790)
* List snapshots of dropped tables (CASSANDRA-16843)
* Add information whether sstables are dropped to SchemaChangeListener (CASSANDRA-17582)
@@ -486,9 +486,11 @@ private static Throwable deleteRecursively(File fileOrDirectory, Throwable accum
{
if (fileOrDirectory.isDirectory())
{
for (File f : fileOrDirectory.tryList())
File[] files = fileOrDirectory.tryList();
if (files != null)
{
accumulate = FileUtils.deleteWithConfirm(f, accumulate);
for (File f : files)
accumulate = FileUtils.deleteWithConfirm(f, accumulate);
}
}
return FileUtils.deleteWithConfirm(fileOrDirectory, accumulate);

0 comments on commit 559b17f

Please sign in to comment.