indicesToDrop.remove(key.toString());
}
- LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
+ if (!indicesToDrop.isEmpty()) {
+ LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
- for (String s : indicesToDrop) {
- FileUtil.delete(IndexInfrastructure.getIndexRootDir(StubIndexKey.createIndexKey(s)));
+ for (String s : indicesToDrop) {
+ FileUtil.delete(IndexInfrastructure.getIndexRootDir(StubIndexKey.createIndexKey(s)));
+ }
}
}
for (ID<?, ?> key : ids) {
indicesToDrop.remove(key.toString());
}
- LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
- for (String s : indicesToDrop) {
- FileUtil.deleteWithRenaming(IndexInfrastructure.getIndexRootDir(ID.create(s)));
+ if (!indicesToDrop.isEmpty()) {
+ LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
+ for (String s : indicesToDrop) {
+ FileUtil.deleteWithRenaming(IndexInfrastructure.getIndexRootDir(ID.create(s)));
+ }
}
try {