[ 
https://issues.apache.org/jira/browse/PDFBOX-5674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765985#comment-17765985
 ] 

ASF subversion and git services commented on PDFBOX-5674:
---------------------------------------------------------

Commit 1912354 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1912354 ]

PDFBOX-5674: refactor string operations, as suggested by Axel Howind

> refactor string operations
> --------------------------
>
>                 Key: PDFBOX-5674
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5674
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Axel Howind
>            Priority: Minor
>         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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to