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_r281618682
##########
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:
@michaelandrepearce / @jbertram / @franz1981 from now on.. any "automated"
changes like this will have a big flag for me.
It's easy to make changes while you're not even testing them.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services