[
https://issues.apache.org/jira/browse/PDFBOX-2576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520674#comment-14520674
]
John Hewson commented on PDFBOX-2576:
-------------------------------------
I have a 27" screen, so it _just_ fits. I totally agree that this method is too
long, but splitting it up needs to be done more carefully due to state - we
seem to be on the same page regarding that.
I have a personal preference for slightly larger methods, which isn't for
everyone, but this particular method was a really tricky one. It was previously
implemented by half a dozen little methods scattered between different
subclasses with no clear philosophy. So the first step for me was to get
everything into one method, which was a big improvement and much less
complicated. I suppose the next step is to split things up a bit, though this
code is still somewhat in flux, so that might be premature.
Feel free to poke me about any recent code which you think needs splitting. The
problem with the recent code is that it is still in flux, so it's often too
early to optimise such things without creating the wrong abstraction. In this
case I'm having issues with the patch form PDFBOX-1900 which has ended up
overwriting this code. Still, once it's working I'll take a second pass at
splitting up this method.
> Improve code quality
> --------------------
>
> Key: PDFBOX-2576
> URL: https://issues.apache.org/jira/browse/PDFBOX-2576
> Project: PDFBox
> Issue Type: Task
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Attachments: ExtractText.2.patch, ExtractText.patch,
> GraphicsOperatorProcessor.patch, SecuryHandlerFactory.patch,
> Type5ShadingContext.patch, examples.arrayclone.patch,
> fontbox.arrayclone.patch, org.apache.fontbox.afm.patch,
> org.apache.fontbox.cff.cffparser.patch, org.apache.fontbox.cff.patch,
> org.apache.fontbox.cmap.patch,
> org.apache.pdfbox.contentstream.operator.state.patch,
> org.apache.pdfbox.cos.patch, org.apache.pdfbox.filter-2.patch,
> org.apache.pdfbox.filter.patch, org.apache.pdfbox.pdfwriter.COSWriter.patch,
> org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.patch,
> org.apache.pdfbox.pdmodel.documentinterchange.patch,
> org.apache.pdfbox.preflight.graphic.patch, org.apache.pdfbox.resource.patch,
> org.apache.pdfbox.text.testtextstripper.patch, pdfbox-override-patch.txt,
> pdfbox-raw-type-patch.txt, pdfbox.arrayclone.patch,
> pdfcloneutility-patch.txt, pdftextstripperbyarea-patch.txt,
> ttfsubsetter-2.patch, ttfsubsetter-3.patch, ttfsubsetter-patch.txt
>
>
> This is a longterm issue for the task to improve code quality, by using the
> [SonarQube
> report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor],
> hints in different IDEs, the FindBugs tool and other code quality tools.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]