XiaoyiPeng opened a new issue #3533:
URL: https://github.com/apache/rocketmq/issues/3533
**BUG REPORT**
1. Please describe the issue you observed:
When initializing a HashMap as a local variable that will not escape, it
is better to specify the `initialCapacity`.
The code in class
`org.apache.rocketmq.broker.filter.MessageEvaluationContext#keyValues` shown
below is better.
```java
public Map<String, Object> keyValues() {
if (properties == null) {
return null;
}
Map<String, Object> copy = new HashMap<String,
Object>(properties.size(), 1);
for (String key : properties.keySet()) {
copy.put(key, properties.get(key));
}
return copy;
}
```
2. Please tell us about your environment:
Windows10
--
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]