diff options
author | Dominik Stadler <centic@apache.org> | 2015-04-13 12:19:11 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2015-04-13 12:19:11 +0000 |
commit | 2c7987545b7f9bc6cab84a9c812c512092ad7fc9 (patch) | |
tree | 55436e7e22f94e422d79854de1b913eef7c795e1 /src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java | |
parent | 690abbe5547df702ce83cf2fe63a3bc4c00f1df6 (diff) | |
download | poi-2c7987545b7f9bc6cab84a9c812c512092ad7fc9.tar.gz poi-2c7987545b7f9bc6cab84a9c812c512092ad7fc9.zip |
Bug 57163: Fix possible NullPointerException when a spreadsheet has no LinkTable and we try to adjust it during sheet removal.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1673168 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 73256b6897..0bb1de24b4 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -2716,4 +2716,14 @@ public final class TestBugs extends BaseTestBugzillaIssues { Workbook wb = openSample("57456.xls"); wb.close(); } + + @Test + public void test57163() throws IOException { + Workbook wb = openSample("57163.xls"); + + while (wb.getNumberOfSheets() > 1) { + wb.removeSheetAt(1); + } + wb.close(); + } } |