You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/02/19 19:48:12 UTC
[activemq-artemis] branch master updated: NO-JIRA Fix a
"Inefficient Map Iterator" SpotBugs warning
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 99e39f5 NO-JIRA Fix a "Inefficient Map Iterator" SpotBugs warning
new a797b7e This closes #2553
99e39f5 is described below
commit 99e39f5f1c59d0dc5baa0405b143b17a71e8119f
Author: Jiri Danek <jd...@redhat.com>
AuthorDate: Thu Feb 14 15:43:52 2019 +0100
NO-JIRA Fix a "Inefficient Map Iterator" SpotBugs warning
https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#wmi-inefficient-use-of-keyset-iterator-instead-of-entryset-iterator-wmi-wrong-map-iterator
---
.../apache/activemq/artemis/core/management/impl/AbstractControl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java
index a6d531a..fe09a39 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java
@@ -106,8 +106,8 @@ public abstract class AbstractControl extends StandardMBean {
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())));
}
}
message.setType((byte) type);