diff options
author | Maxim Valyanskiy <maxcom@apache.org> | 2011-06-30 11:46:27 +0000 |
---|---|---|
committer | Maxim Valyanskiy <maxcom@apache.org> | 2011-06-30 11:46:27 +0000 |
commit | bade89b292a63acb5a34caba9064eae2d1809e86 (patch) | |
tree | 8e1ef4a0ee3f89c8b70977cde10e89d31f594276 | |
parent | cd3e2b23c806b3dedac81a00db9684c9fe3838c9 (diff) | |
download | poi-bade89b292a63acb5a34caba9064eae2d1809e86.tar.gz poi-bade89b292a63acb5a34caba9064eae2d1809e86.zip |
hwpf: ignore ArrayIndexOutOfBoundsException in TableSprmUncompressor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1141490 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java index 8f9455d7b6..342c68e7b7 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java @@ -21,10 +21,14 @@ import org.apache.poi.hwpf.usermodel.BorderCode; 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 + ); + } } } |