diff options
author | Dominik Stadler <centic@apache.org> | 2024-06-02 11:31:31 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2024-06-02 11:31:31 +0000 |
commit | 3f243f65ab2cf274a16542fe0bc25f402959f6d3 (patch) | |
tree | a3d9a17d4d384e8b53eaeedb2451588e63a10aaf | |
parent | 329a65973999f106c3273b9328b76c49bb9a26e2 (diff) | |
download | poi-3f243f65ab2cf274a16542fe0bc25f402959f6d3.tar.gz poi-3f243f65ab2cf274a16542fe0bc25f402959f6d3.zip |
Change one exception to warning-log to avoid regressions in mass-tests
This avoids "breaking" a few documents which could be opened before.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918118 13f79535-47bb-0310-9956-ffa450edef68
4 files changed, 4 insertions, 3 deletions
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java index ecf46adc83..5885cff08f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java @@ -19,6 +19,8 @@ package org.apache.poi.hwpf.model; import java.util.LinkedList; import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.apache.poi.ddf.DefaultEscherRecordFactory; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherBlipRecord; @@ -33,6 +35,7 @@ import org.apache.poi.util.LittleEndian; @Internal public class PICFAndOfficeArtData { + private static final Logger LOG = LogManager.getLogger(PicturesTable.class); /** * Can contain either a {@link EscherBlipRecord} or a {@link EscherBSERecord}. @@ -89,7 +92,7 @@ public class PICFAndOfficeArtData { // [MS-ODRAW] allows for multiple records in a OfficeArtInlineSpContainer, which is what we're parsing here. // However, in the context of a HWPF document, there should be only 1. if (_blipRecords.size() != 1) { - throw new IllegalStateException("Should only have one BLIP-Record, but had: " + _blipRecords.size()); + LOG.atWarn().log("Should only have one BLIP-Record, but had: " + _blipRecords.size()); } } } diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java index 0eb956e88c..9cfb4b6d11 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java @@ -61,7 +61,6 @@ public class TestWordToConverterSuite { "clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc", - "clusterfuzz-testcase-minimized-POIHWPFFuzzer-4892412469968896.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-6610789829836800.doc" ); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java index f33cffb433..d469f00015 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java @@ -54,7 +54,6 @@ public class TestWordToTextConverter { "clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc", - "clusterfuzz-testcase-minimized-POIHWPFFuzzer-4892412469968896.doc", "clusterfuzz-testcase-minimized-POIHWPFFuzzer-6610789829836800.doc" ); diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls Binary files differindex 5a384cdef3..4c9c65f32a 100644 --- a/test-data/spreadsheet/stress.xls +++ b/test-data/spreadsheet/stress.xls |