You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/09/16 16:40:00 UTC

[jira] [Resolved] (PDFBOX-5674) refactor string operations

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

Tilman Hausherr resolved PDFBOX-5674.
-------------------------------------
    Fix Version/s: 4.0.0
         Assignee: Tilman Hausherr
       Resolution: Fixed

Thanks!

> refactor string operations
> --------------------------
>
>                 Key: PDFBOX-5674
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5674
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Axel Howind
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 4.0.0
>
>         Attachments: refactor_String_operations.patch
>
>
> * Conversion of StringBuilder to String was simplified by using the objects directly in the concatenation, instead of calling the toString() function.
> * The equality check for empty strings was converted from an equals method call ("".equals(stringVar)) to use the isEmpty() method.
> * When obtaining a one-character substring from a string, charAt() was used in preference over substring().
> * The new keyword was discarded when converting a single character into a string, using String.valueOf() instead.
> * The creation of a string from a ByteArrayOutputStream was simplified to call toString(encoding) directly.



--
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