[
https://issues.apache.org/jira/browse/PDFBOX-2516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222580#comment-14222580
]
John Hewson edited comment on PDFBOX-2516 at 11/24/14 2:00 AM:
---------------------------------------------------------------
{quote}
- either using an IOException so it’s easier to handle and be inline with most
of the exceptions we throw
{quote}
For any method where the using is setting the value, rather than reading the
value from a PDF, you want IllegalArgumentException.
{quote}
- be implemented differently so setValue is not a method of the parent class
but child classes implement them individually so type constraints could be
reflected in the method parameters so the method signature would provide a hint?
{quote}
This would be the best approach, alternatively you can override setValue in
child classes and provide more refined parameter types, i.e., setValue(COSBase)
can be overridden by setValue(COSName) in a subclass, because COSName <:
COSBase.
was (Author: jahewson):
{quote}
- either using an IOException so it’s easier to handle and be inline with most
of the exceptions we throw
{quote}
For any method where the using is setting the value, rather than reading the
value from a PDF, you want IllegalArgumentException.
{quote}
- be implemented differently so setValue is not a method of the parent class
but child classes implement them individually so type constraints could be
reflected in the method parameters so the method signature would provide a hint?
{quote}
This would be the best approach, alternatively you can override setValue in
child classes and provide more refined parameter types. (i.e. setValue(COSBase)
can be overridden by setValue(COSName) in a subclass, because COSName <:
COSBase.
> Further align AcroForms and Fields PDModel with PDF specification
> -----------------------------------------------------------------
>
> Key: PDFBOX-2516
> URL: https://issues.apache.org/jira/browse/PDFBOX-2516
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Maruan Sahyoun
> Assignee: Maruan Sahyoun
>
> The PDModel for AcroForms and the fields being part of it
> (o.a.p.pdmodel.interactive.form) needs to be enhanced. Sample issues:
> - RadioButton and Checkbox don’t support DV entries although they should
> - inheritable attributes only support inheritance either form their parent
> or the root of the AcroForms model which is not inline with the specification
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)