fix test to catch also NoSuchFileException

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1491222 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2013-06-09 14:01:14 +00:00
parent 66b2736568
commit cd4e6b3231
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package org.apache.lucene.replicator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.NoSuchFileException;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
@ -156,6 +157,8 @@ public class LocalReplicatorTest extends ReplicatorTestCase {
fail("should have failed obtaining an unrecognized file");
} catch (FileNotFoundException e) {
// expected
} catch (NoSuchFileException e) {
// expected (only java 1.7)
}
}