From: Sergey Vladimirov Date: Tue, 5 Jul 2011 11:58:50 +0000 (+0000) Subject: handle empty strings X-Git-Tag: REL_3_8_BETA4~314 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78a2ba411e0c18002c07096a4dd6f6cd45c7ebf9;p=poi.git handle empty strings git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143012 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java index dd522de683..015c6141b2 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java @@ -50,8 +50,8 @@ public final class TableRow Paragraph p = getParagraph(start); String s = p.text(); - while (! ( (s.charAt(s.length() - 1) == TABLE_CELL_MARK) || - p.isEmbeddedCellMark() && p.getTableLevel() == levelNum)) + while (! ( s.length() > 0 && (s.charAt(s.length() - 1) == TABLE_CELL_MARK) || + p.isEmbeddedCellMark() && p.getTableLevel() == levelNum) && end < endIdx) { end++; p = getParagraph(end);