You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/06/11 13:36:56 UTC

[GitHub] [netbeans] AlexFalappa commented on issue #1288: [NETBEANS-2653] Generate toString() with StringBuilder

AlexFalappa commented on issue #1288: [NETBEANS-2653] Generate toString() with StringBuilder
URL: https://github.com/apache/netbeans/pull/1288#issuecomment-500844498
 
 
   If I am not mistaken from Java 8 upwards the compiler is able to use `StringBuilder` under the hood for simple string concatenation like that generated by NB in toString implementations out of a handful of class member variables.
   
   Explicit use of `StringBuilder` is recommended when concatenating string literals in a loop.
   
   See [here](http://www.pellegrino.link/2015/08/22/string-concatenation-with-java-8.html) for a deepest analysis and some benchmarks.
   
   To sum up this modification will be beneficial for those on Java 6 and 7 from a performance point of view

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists