SOLR-9859: Don't log error on NoSuchFileException (Cao Manh Dat)

This commit is contained in:
markrmiller 2017-01-08 09:21:43 -05:00
parent f985fcaa23
commit 25290ab5d6
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import java.io.FileFilter;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.nio.file.NoSuchFileException;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -191,7 +192,7 @@ public abstract class DirectoryFactory implements NamedListInitializedPlugin,
public void renameWithOverwrite(Directory dir, String fileName, String toName) throws IOException { public void renameWithOverwrite(Directory dir, String fileName, String toName) throws IOException {
try { try {
dir.deleteFile(toName); dir.deleteFile(toName);
} catch (FileNotFoundException e) { } catch (FileNotFoundException | NoSuchFileException e) {
} catch (Exception e) { } catch (Exception e) {
log.error("Exception deleting file", e); log.error("Exception deleting file", e);