Tilman Hausherr created PDFBOX-6111:
---------------------------------------

             Summary: ClassCastException in 
XMPMediaManagementSchema.getHistory()
                 Key: PDFBOX-6111
                 URL: https://issues.apache.org/jira/browse/PDFBOX-6111
             Project: PDFBox
          Issue Type: Bug
          Components: XmpBox
    Affects Versions: 3.0.6 PDFBox, 2.0.35
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 2.0.36, 3.0.7 PDFBox, 4.0.0


This happens with the XMP of testPDFBox5288 if I add 
{{xmpMediaManagementSchema.getHistory()}}:

{noformat}
java.lang.ClassCastException: class org.apache.xmpbox.type.ResourceEventType 
cannot be cast to class org.apache.xmpbox.type.AbstractSimpleProperty 
(org.apache.xmpbox.type.ResourceEventType and 
org.apache.xmpbox.type.AbstractSimpleProperty are in unnamed module of loader 
'app')
        at 
org.apache.xmpbox.type.ArrayProperty.lambda$getElementsAsString$0(ArrayProperty.java:76)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at 
org.apache.xmpbox.type.ArrayProperty.getElementsAsString(ArrayProperty.java:76)
        at 
org.apache.xmpbox.schema.XMPSchema.getUnqualifiedSequenceValueList(XMPSchema.java:857)
        at 
org.apache.xmpbox.schema.XMPMediaManagementSchema.getHistory(XMPMediaManagementSchema.java:792)
        at 
org.apache.xmpbox.xml.DomXmpParserTest.testPDFBox5288(DomXmpParserTest.java:154){noformat}

The reason is that this call expects a list of simple types but it is a list of 
ResourceEventType. I'll deprecate the method in 2.0 and 3.0 and remove it in 
the trunk.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to