poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1143012 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
Date Tue, 05 Jul 2011 11:58:50 GMT
Author: sergey
Date: Tue Jul  5 11:58:50 2011
New Revision: 1143012

URL: http://svn.apache.org/viewvc?rev=1143012&view=rev
Log:
handle empty strings

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java?rev=1143012&r1=1143011&r2=1143012&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java Tue Jul  5 11:58:50
2011
@@ -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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message