You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Yonas Jongkind (JIRA)" <ji...@apache.org> on 2010/07/30 19:35:16 UTC
[jira] Updated: (PDFBOX-786) PDChoiceField's implementation of
SetValue does not work for all PDF forms. Sometimes it throws
ClassCastException
[ https://issues.apache.org/jira/browse/PDFBOX-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonas Jongkind updated PDFBOX-786:
----------------------------------
Attachment: PDChoiceField.java
This version works. Please commit the fix!
> PDChoiceField's implementation of SetValue does not work for all PDF forms. Sometimes it throws ClassCastException
> ------------------------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-786
> URL: https://issues.apache.org/jira/browse/PDFBOX-786
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.2.1
> Environment: Java6/MacosX
> Reporter: Yonas Jongkind
> Attachments: PDChoiceField.java, screenshot-1.jpg
>
>
> For a choice with the following options:
> COSArray{[COSString{ }, COSArray{[COSString{NR}, COSString{Non-reactive}]}, COSArray{[COSString{R}, COSString{Reactive}]}, COSArray{[COSString{Declined}, COSString{Declined}]}]}
> A class cast is thrown as the code expects all items to be strings as the first item is a string. However, the remaining items are all pairs.
> The attached code is the fix. It just makes the pair/single check every time through the loop.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.