You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/08/09 15:16:16 UTC

[jira] Resolved: (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 ]

Jukka Zitting resolved PDFBOX-786.
----------------------------------

         Assignee: Jukka Zitting
    Fix Version/s: 1.3.0
       Resolution: Fixed

Thanks! Changes committed in revision 983631.

> 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
>            Assignee: Jukka Zitting
>             Fix For: 1.3.0
>
>         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.