Author: sergey
Date: Fri Jul 22 14:28:54 2011
New Revision: 1149617

URL: http://svn.apache.org/viewvc?rev=1149617&view=rev
Log:
fix ArrayIndexOutOfBoundsException

Modified:
    
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java?rev=1149617&r1=1149616&r2=1149617&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
 Fri Jul 22 14:28:54 2011
@@ -132,7 +132,11 @@ public abstract class AbstractWordConver
         TableCell upperCell = null;
         for ( int r1 = r - 1; r1 >= 0; r1-- )
         {
-            final TableCell prevCell = table.getRow( r1 ).getCell( c );
+            final TableRow row = table.getRow( r1 );
+            if ( row == null || c >= row.numCells() )
+                continue;
+
+            final TableCell prevCell = row.getCell( c );
             if ( prevCell != null && prevCell.isFirstVerticallyMerged() )
             {
                 upperCell = prevCell;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to