From 96c489deebd92d38a4780ec3ac49d9a0d19e2dd4 Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Sun, 11 May 2008 08:15:39 +0000 Subject: 41187 - fixed HSSFSheet to properly read xls files without ROW records git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@655278 13f79535-47bb-0310-9956-ffa450edef68 --- src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java') diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java index b6f22022c6..f0c4139d2e 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java @@ -143,8 +143,9 @@ public final class TestHSSFRow extends TestCase { try { sheet.createRow(-1); fail("IndexOutOfBoundsException should have been thrown"); - } catch (IndexOutOfBoundsException ex) { + } catch (IllegalArgumentException e) { // expected during successful test + assertEquals("Invalid row number (-1) outside allowable range (0..65535)", e.getMessage()); } //Test high row bound @@ -153,8 +154,9 @@ public final class TestHSSFRow extends TestCase { try { sheet.createRow(65536); fail("IndexOutOfBoundsException should have been thrown"); - } catch (IndexOutOfBoundsException ex) { + } catch (IllegalArgumentException e) { // expected during successful test + assertEquals("Invalid row number (65536) outside allowable range (0..65535)", e.getMessage()); } } -- cgit v1.2.3