[
https://issues.apache.org/jira/browse/PDFBOX-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13897663#comment-13897663
]
Jens Kapitza commented on PDFBOX-1903:
--------------------------------------
summary: PDPage and PDPageNode have no super class, and a lot of methods are
duplicated.
I've changed this and PDBasePage is created.
I've created Interfaces (maybe you just delete them and just use PDBasePage)
The reasen was the getKids method and collecting all Pages (i hate to cast
every time) so i created the BasePage.
in short: reduce lines of code with superclass and move most of the methods
which are duplicated
there are some methods (i think there were two) that are a little bit diffrent
(so there is a overriding and a super.method call) which extent the method.
The other one is setResources where PDPage and PDPageNode using confusing
othere resources (getCOSObject) and not PDResources directly.
the other trivial change is where getAllKids was called (know that is
PDBasePage) so i've fixed those lines.
> refactor pdmodel (pdpage)
> -------------------------
>
> Key: PDFBOX-1903
> URL: https://issues.apache.org/jira/browse/PDFBOX-1903
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Jens Kapitza
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: pdfbox-refactor-pdpage.patch
>
> Original Estimate: 1.5h
> Remaining Estimate: 1.5h
>
> refactor pdpage stuff
> create a super class
> remove duplicated code
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)