diff options
author | Dominik Stadler <centic@apache.org> | 2017-01-26 19:58:46 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2017-01-26 19:58:46 +0000 |
commit | 2c8f25c8642d7f30499567da53dd279a7ef59423 (patch) | |
tree | 059e7aa51a36f5b9b64f174abaffe5329f07ce0d /src/testcases/org/apache | |
parent | abf8c414f89ca0725d04213271b40c7dfe9bb4ce (diff) | |
download | poi-2c8f25c8642d7f30499567da53dd279a7ef59423.tar.gz poi-2c8f25c8642d7f30499567da53dd279a7ef59423.zip |
IntelliJ warnings, Javadoc, Formatting
Changes for the RecordFormatException deprecation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java b/src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java index a63fd7b039..0f6caa7589 100644 --- a/src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java +++ b/src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java @@ -203,7 +203,6 @@ public final class TestPageSettingsBlock extends TestCase { * was added while fixing bug 47199. All existing POI test samples comply with this requirement. */ public void testDuplicatePSBRecord_bug47199() { - // Hypothetical setup of PSB records which should cause POI to crash Record[] recs = { new HeaderRecord("&LSales Figures"), @@ -214,10 +213,8 @@ public final class TestPageSettingsBlock extends TestCase { try { new PageSettingsBlock(rs); throw new AssertionFailedError("Identified bug 47199b - duplicate PSB records should not be allowed"); - } catch (RecordFormatException e) { - if (e.getMessage().equals("Duplicate PageSettingsBlock record (sid=0x14)")) { - // expected during successful test - } else { + } catch (org.apache.poi.util.RecordFormatException e) { + if (!e.getMessage().equals("Duplicate PageSettingsBlock record (sid=0x14)")) { throw new AssertionFailedError("Expected RecordFormatException due to duplicate PSB record"); } } @@ -288,7 +285,7 @@ public final class TestPageSettingsBlock extends TestCase { PageSettingsBlock psb; try { psb = new PageSettingsBlock(rs); - } catch (RecordFormatException e) { + } catch (org.apache.poi.util.RecordFormatException e) { if ("Duplicate PageSettingsBlock record (sid=0x4d)".equals(e.getMessage())) { throw new AssertionFailedError("Identified bug 47415"); } |