diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java index cc2f4760ab2..ac81050ac94 100644 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -1013,6 +1013,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { } public static boolean recurseDelete(File f) { + if(f == null || !f.exists()) return false; if (f.isDirectory()) { for (File sub : f.listFiles()) { if (!recurseDelete(sub)) {