Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.0.0 PDFBox
-
None
-
None
Description
I noticed a new NPE in one of our test files on Tika when I recently built PDFBox's trunk. I've attached the file.
If I don't set strict parsing to false, the parse works.
DomXmpParser xmpParser = new DomXmpParser(); xmpParser.setStrictParsing(false); Path p = Paths.get(".../metadata.xml"); try (InputStream is = Files.newInputStream(p)) { XMPMetadata metadata = xmpParser.parse(is); for (XMPSchema schema : metadata.getAllSchemas()) { for (AbstractField f : schema.getAllProperties()) { System.out.println(f); } } }
Stack
ava.lang.NullPointerException at org.apache.xmpbox.xml.DomXmpParser.parseLiDescription(DomXmpParser.java:608) at org.apache.xmpbox.xml.DomXmpParser.parseLiElement(DomXmpParser.java:529) at org.apache.xmpbox.xml.DomXmpParser.manageArray(DomXmpParser.java:487) at org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:352) at org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:319) at org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:248) at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:201) at org.apache.tika.parser.indesign.IDMLParserTest.testXMP(IDMLParserTest.java:81)
Attachments
Attachments
Issue Links
- duplicates
-
PDFBOX-5649 NPE in DomXmpParser.parseLiDescription
- Closed
- relates to
-
PDFBOX-5128 Support parsing non standardized XMP
- Closed