Fix print out of warning if file of change index version is not a directory
The condition to print out the warning 'exists && !f.isDirectory()' could never be true since 'exists' was only true if 'f.isDirectory()': boolean exists = f.exists() && f.isDirectory() Change-Id: I93f7b140c05e43e5af4a3083f69e913ecf8f6a84 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -162,7 +162,7 @@ class LuceneVersionManager implements LifecycleListener {
|
||||
for (Schema<ChangeData> schema : ChangeSchemas.ALL.values()) {
|
||||
File f = getDir(sitePaths, schema);
|
||||
boolean exists = f.exists() && f.isDirectory();
|
||||
if (exists && !f.isDirectory()) {
|
||||
if (f.exists() && !f.isDirectory()) {
|
||||
log.warn("Not a directory: %s", f.getAbsolutePath());
|
||||
}
|
||||
int v = schema.getVersion();
|
||||
|
Reference in New Issue
Block a user