diff options
author | Dominik Stadler <centic@apache.org> | 2023-08-07 11:11:08 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-08-07 11:11:08 +0000 |
commit | a8b31c37a6728063f9e5df620c6f885990de0e93 (patch) | |
tree | 3369fd8121d26bf615524279345e261a4b865664 /poi-ooxml/src | |
parent | 31fd087a4895239e01d09ee68389b2a5e78c3d47 (diff) | |
download | poi-a8b31c37a6728063f9e5df620c6f885990de0e93.tar.gz poi-a8b31c37a6728063f9e5df620c6f885990de0e93.zip |
Bug 66425: Avoid a ClassCastException found via oss-fuzz
Add exception details and fix expected exceptions to make tests run again
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911503 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java index 1ddc55d98a..b5c926967e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java @@ -286,7 +286,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody { } } } catch (ClassCastException e) { - throw new IllegalArgumentException("Relation and type of document-part did not match, had relation " + relation + " and type of document-part: " + p.getClass()); + throw new IllegalArgumentException("Relation and type of document-part did not match, had relation " + relation + " and type of document-part: " + p.getClass(), e); } } initHyperlinks(); |