Author: maxcom
Date: Thu Jun 30 11:46:27 2011
New Revision: 1141490

URL: http://svn.apache.org/viewvc?rev=1141490&view=rev
Log:
hwpf: ignore ArrayIndexOutOfBoundsException in TableSprmUncompressor

Modified:
    
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java?rev=1141490&r1=1141489&r2=1141490&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
 Thu Jun 30 11:46:27 2011
@@ -21,10 +21,14 @@ import org.apache.poi.hwpf.usermodel.Bor
 import org.apache.poi.hwpf.usermodel.TableCellDescriptor;
 import org.apache.poi.hwpf.usermodel.TableProperties;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 public final class TableSprmUncompressor
   extends SprmUncompressor
 {
+  private static final POILogger logger = POILogFactory.getLogger( 
TableSprmUncompressor.class );
+
   public TableSprmUncompressor()
   {
   }
@@ -44,7 +48,16 @@ public final class TableSprmUncompressor
       //uncompress the right type of sprm.
       if (sprm.getType() == SprmOperation.TAP_TYPE)
       {
-        unCompressTAPOperation(newProperties, sprm);
+        try {
+            unCompressTAPOperation(newProperties, sprm);
+        } catch (ArrayIndexOutOfBoundsException ex) {
+              logger.log(
+                      POILogger.ERROR,
+                      "Unable to apply SPRM operation '"
+                              + sprm.getOperation() + "': ",
+                      ex
+              );
+        }
       }
     }
 



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

Reply via email to