diff options
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java b/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java index 97eefa8826..113329265f 100644 --- a/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java +++ b/src/testcases/org/apache/poi/hssf/HSSFTestDataSamples.java @@ -77,8 +77,16 @@ public final class HSSFTestDataSamples { throw new RuntimeException("Sample file '" + sampleFileName + "' not found in data dir '" + _resolvedDataDir.getAbsolutePath() + "'"); } -// System.out.println("opening " + f.getAbsolutePath()); - try { + try { + if(!sampleFileName.equals(f.getCanonicalFile().getName())){ + throw new RuntimeException("File name is case-sensitive: requested '" + sampleFileName + + "' but actual file is '" + f.getCanonicalFile().getName() + "'"); + } + } catch (IOException e){ + throw new RuntimeException(e); + } + + try { return new FileInputStream(f); } catch (FileNotFoundException e) { throw new RuntimeException(e); |