mirror of https://github.com/apache/lucene.git
listFiles can return null if a different thread removes the dir concurrently (may happen in Solr tests),..
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1598499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
19b80d1afe
commit
4dd09dfd07
|
@ -120,6 +120,7 @@ public final class TestUtil {
|
|||
}
|
||||
|
||||
private static LinkedHashSet<File> rm(LinkedHashSet<File> unremoved, File... locations) {
|
||||
if (locations != null) {
|
||||
for (File location : locations) {
|
||||
if (location != null && location.exists()) {
|
||||
if (location.isDirectory()) {
|
||||
|
@ -131,6 +132,7 @@ public final class TestUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return unremoved;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue