michaelandrepearce commented on a change in pull request #2548: ARTEMIS-2118
Enhanced Message Groups Support
URL: https://github.com/apache/activemq-artemis/pull/2548#discussion_r258253358
##########
File path:
artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
##########
@@ -454,7 +454,16 @@ public boolean contains(final char c) {
* @return the concatenated SimpleString
*/
public SimpleString concat(final String toAdd) {
- return concat(new SimpleString(toAdd));
+ int len = toAdd.length();
Review comment:
It basically avoiding a new object and a byte array being created and thrown
away uneededly. If its contentious i can revert, as not actually needed for
this feature, just something i noticed when looking at object creation when
profiling during dev of the feature.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services