You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2025/05/04 10:22:00 UTC

[jira] [Resolved] (PDFBOX-6000) remove unnecessary iteration and StringBuilder creation

     [ https://issues.apache.org/jira/browse/PDFBOX-6000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-6000.
----------------------------------------
    Resolution: Fixed

[~axh] thanks for the contribution

> remove unnecessary iteration and StringBuilder creation
> -------------------------------------------------------
>
>                 Key: PDFBOX-6000
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6000
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing
>    Affects Versions: 2.0.34, 3.0.5 PDFBox, 4.0.0
>            Reporter: Axel Howind
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>             Fix For: 2.0.35, 3.0.6 PDFBox, 4.0.0
>
>         Attachments: remove_unnecessary_iteration_and_StringBuilder_creation.patch
>
>
> As the size is known beforehand, we can see that the loop runs exactly once. So the loop can be removed and we can avoid storing the input in a temporary StringBuilder instance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org