Skip to content

Commit 84a485b

Browse files
tulinkryVladimir Kotal
authored andcommitted
correct exception type
1 parent 878a432 commit 84a485b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/FileHistoryCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
import java.io.BufferedWriter;
3636
import java.io.File;
3737
import java.io.FileInputStream;
38-
import java.io.FileNotFoundException;
3938
import java.io.FileOutputStream;
4039
import java.io.FileReader;
4140
import java.io.IOException;
4241
import java.io.OutputStreamWriter;
4342
import java.io.Writer;
43+
import java.nio.file.NoSuchFileException;
4444
import java.nio.file.Paths;
4545
import java.util.ArrayList;
4646
import java.util.Collections;
@@ -790,7 +790,7 @@ public void clear(Repository repository) {
790790
// Remove all files which constitute the history cache.
791791
try {
792792
IOUtils.removeRecursive(Paths.get(histDir));
793-
} catch (FileNotFoundException ex) {
793+
} catch (NoSuchFileException ex) {
794794
LOGGER.log(Level.WARNING, "directory {} does not exist", histDir);
795795
} catch (IOException ex) {
796796
LOGGER.log(Level.SEVERE, "tried removeRecursive()", ex);

0 commit comments

Comments
 (0)