Skip to content

Commit 37f950c

Browse files
committed
PDFBOX-5660: improve exception message
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930197 13f79535-47bb-0310-9956-ffa450edef68
1 parent 58fd68f commit 37f950c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,10 @@ private void manageArray(XMPMetadata xmp, Element property, PropertyType type, C
478478
{
479479
// not an array
480480
String whatFound = "nothing";
481-
if (property.getFirstChild() != null)
481+
Node firstChild = property.getFirstChild();
482+
if (firstChild != null)
482483
{
483-
whatFound = property.getFirstChild().getClass().getName();
484+
whatFound = firstChild instanceof Text ? "Text" : firstChild.getClass().getName();
484485
}
485486
throw new XmpParsingException(ErrorType.Format, "Invalid array definition, expecting " + type.card()
486487
+ " and found "

0 commit comments

Comments
 (0)