[
https://issues.apache.org/jira/browse/PDFBOX-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Hewson updated PDFBOX-1384:
--------------------------------
Fix Version/s: 2.0.0
> Proposals for a new PDNameTreeNode and PDNumberTreeNode
> -------------------------------------------------------
>
> Key: PDFBOX-1384
> URL: https://issues.apache.org/jira/browse/PDFBOX-1384
> Project: PDFBox
> Issue Type: Improvement
> Reporter: Dominic Tubach
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: DTPDNameTreeNode.java, DTPDNameTreeNodeTest.java,
> DTPDNumberTreeNode.java, DTPDNumberTreeNodeTest.java
>
>
> Attached are proposals for a new PDNameTreeNode and a new PDNumberTreeNode.
> (As both are very similar, I put them in one instead of two issues.)
> Main differences:
> - type safety through generics.
> - it's always clear which types of objects the array holds.
> - flexible object conversion through COSBaseConverter.
> - remove method.
> - size and isEmpty method.
> - correct updating of limits (even in parent nodes) when setting kids, names
> or removing values. (Does not set limits in root node as defined by the PDF
> spec.)
> - removes empty child nodes.
> Drawbacks:
> - replacing the existing classes would require changes in existing code.
> - requires (as of now) Java 1.6 (It might be enough to remove the @Override
> annotations for Java 1.5 compatibility.)
> The required COSBaseConverter can be found in issue #PDFBOX-1383
> (To avoid conflicts with the existing classes i prefixed everything with my
> initials.)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)