dk2k opened a new pull request, #9805: URL: https://github.com/apache/camel/pull/9805
Fixed concatenations with empty string - substituted with <Type>.toString() or String.valueOf() Concatenation with an empty string provides for 'plus' operation string context. It means, that numeric types are interpreted as strings by calling String.valueOf(). If you take a look at String.valueOf(int), String.valueOf(long) or String.valueOf(double), you can see it's redirected to Integer.toString(), Long.toString() and Double.toString(). So, sometimes I save a stack frame avoiding a call. Another aspect. "" + long1 most likely will be translated to new StringBuilder().append(String.valueOf(long1)); or new StringBuilder().append(mew Long(long1).toString()); Hence, I can avoid creation of this temporal StringBuilder and probably of Long. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
