[
https://issues.apache.org/jira/browse/PDFBOX-4569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018918#comment-17018918
]
Andreas Lehmkühler commented on PDFBOX-4569:
--------------------------------------------
[~tilman]
Thanks for the fast feedback! I've already fixed the javadoc issue.
w.r.t. cyclic dependency: to understand/maintain the code it is necessary to
keep the code as simple and clean as possible. One anti-pattern are cyclic
dependencies, we should avoid them if possible. The class in question
PDDocument doesn't need to know about PDFParser, but vice versa PDFParser uses
PDDocument as a result of the parsing process. Those load methods introduce
unnecessarily such a cyclic dependency.
I totally understand Tilmans argument to have those methods in PDDocument, but
IMHO we have to remove them. Maybe it would be a good idea to follow Tilmans
proposal not to remove all of them now but to deprecated some of them first and
remove them later in 4.0.
Which one should be kept as deprecated:
* file
* file + password
* ....
BTW, I'm not convinced that the current location of the load methods within the
parsers is the best one. How about introducing a utility class
{{org.apache.pdfbox.Loader}} providing a bunch of load/validate methods such as
* loadPDF
* loadFDF
* validatePDF
This would hide some of the implementation details so that it would be easier
to refactor the underlying code without changing the public api. WDYT?
> Implement an ondemand Parser
> ----------------------------
>
> Key: PDFBOX-4569
> URL: https://issues.apache.org/jira/browse/PDFBOX-4569
> Project: PDFBox
> Issue Type: Improvement
> Components: Parsing
> Affects Versions: 3.0.0 PDFBox
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 3.0.0 PDFBox
>
> Attachments: PDFBOX-1084.pdf
>
>
> There is a need to replace the big bang parser with an ondemand parser
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]