aboutsummaryrefslogtreecommitdiffstats
path: root/poi-scratchpad/src/main/java/org/apache/poi/hwpf
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2024-06-02 11:31:31 +0000
committerDominik Stadler <centic@apache.org>2024-06-02 11:31:31 +0000
commit3f243f65ab2cf274a16542fe0bc25f402959f6d3 (patch)
treea3d9a17d4d384e8b53eaeedb2451588e63a10aaf /poi-scratchpad/src/main/java/org/apache/poi/hwpf
parent329a65973999f106c3273b9328b76c49bb9a26e2 (diff)
downloadpoi-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
Diffstat (limited to 'poi-scratchpad/src/main/java/org/apache/poi/hwpf')
-rw-r--r--poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java5
1 files changed, 4 insertions, 1 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());
}
}
}