diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-09-14 09:55:02 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-09-14 09:55:02 +0000 |
commit | e23d96a6ad282787863bad46b234601b359a9b60 (patch) | |
tree | d576b10a6ea73fae4ce2fe5710689af409187b7b /poi | |
parent | 6e7f6dad21f8b618abb7c3af331c83629a785150 (diff) | |
download | poi-e23d96a6ad282787863bad46b234601b359a9b60.tar.gz poi-e23d96a6ad282787863bad46b234601b359a9b60.zip |
try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904066 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/test/java/org/apache/poi/POIDataSamples.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/poi/src/test/java/org/apache/poi/POIDataSamples.java b/poi/src/test/java/org/apache/poi/POIDataSamples.java index 82e06bd57d..3e04fc8976 100644 --- a/poi/src/test/java/org/apache/poi/POIDataSamples.java +++ b/poi/src/test/java/org/apache/poi/POIDataSamples.java @@ -165,7 +165,7 @@ public final class POIDataSamples { public File getFile(String sampleFileName) { File f = new File(_resolvedDataDir, sampleFileName); if (!f.exists()) { - throw new RuntimeException("Sample file '" + sampleFileName + throw new IllegalStateException("Sample file '" + sampleFileName + "' not found in data dir '" + _resolvedDataDir.getAbsolutePath() + "'"); } try { @@ -175,12 +175,12 @@ public final class POIDataSamples { fn = fn.substring(fn.indexOf('/')+1); } if(!fn.equals(f.getCanonicalFile().getName())){ - throw new RuntimeException("File name is case-sensitive: requested '" + fn + throw new IllegalStateException("File name is case-sensitive: requested '" + fn + "' but actual file is '" + f.getCanonicalFile().getName() + "'"); } } } catch (IOException e){ - throw new RuntimeException(e); + throw new IllegalStateException(e); } return f; } |