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

Tony Stevenson moved DEFT-39 to AWF-7:
--------------------------------------

    Reporter: Niklas Gustavsson
         Key: AWF-7  (was: DEFT-39)
     Project: Apache AWF  (was: Deft)
    
> Use StringBuilder instead of String concatenation in for loop
> -------------------------------------------------------------
>
>                 Key: AWF-7
>                 URL: https://issues.apache.org/jira/browse/AWF-7
>             Project: Apache AWF
>          Issue Type: Bug
>            Reporter: Niklas Gustavsson
>
> re: HttpResponse.createInitalLineAndHeaders
> Ran CodePro tools -> Audit code using -> Effective Java, and found this.
> Explanation: The code to concatenate two strings is not very efficient 
> because it creates a StringBuffer for each concatenation. When placed in a 
> loop, this can result in the creation and collection of large numbers of 
> temporary objects. You can create the StringBuffer before entering the loop, 
> and append to it within the loop, thus reducing the overhead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to