[ 
https://issues.apache.org/jira/browse/PDFBOX-6111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041479#comment-18041479
 ] 

ASF subversion and git services commented on PDFBOX-6111:
---------------------------------------------------------

Commit 1930124 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1930124 ]

PDFBOX-6111: remove method that throws a ClassCastException

> 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: 2.0.35, 3.0.6 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             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