You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/05/06 20:17:55 UTC
[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull
request #2553: NO-JIRA Fix a "Inefficient Map Iterator" SpotBugs warning
clebertsuconic commented on a change in pull request #2553: NO-JIRA Fix a "Inefficient Map Iterator" SpotBugs warning
URL: https://github.com/apache/activemq-artemis/pull/2553#discussion_r281342742
##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java
##########
@@ -106,8 +106,8 @@ protected String sendMessage(SimpleString address,
try {
CoreMessage message = new CoreMessage(storageManager.generateID(), 50);
if (headers != null) {
- for (String header : headers.keySet()) {
- message.putStringProperty(new SimpleString(header), new SimpleString(headers.get(header)));
+ for (Map.Entry<String, String> header : headers.entrySet()) {
+ message.putStringProperty(new SimpleString(header.getKey()), new SimpleString(headers.get(header.getValue())));
Review comment:
this should been:
```java
message.putStringProperty(new SimpleString(header.getKey()), new SimpleString(header.getValue()));
```
is that what you're talking about?
How did you realize it?
----------------------------------------------------------------
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