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
This commit is contained in:
parent
5b535da984
commit
99e39f5f1c
|
@ -106,8 +106,8 @@ public abstract class AbstractControl extends StandardMBean {
|
||||||
try {
|
try {
|
||||||
CoreMessage message = new CoreMessage(storageManager.generateID(), 50);
|
CoreMessage message = new CoreMessage(storageManager.generateID(), 50);
|
||||||
if (headers != null) {
|
if (headers != null) {
|
||||||
for (String header : headers.keySet()) {
|
for (Map.Entry<String, String> header : headers.entrySet()) {
|
||||||
message.putStringProperty(new SimpleString(header), new SimpleString(headers.get(header)));
|
message.putStringProperty(new SimpleString(header.getKey()), new SimpleString(headers.get(header.getValue())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message.setType((byte) type);
|
message.setType((byte) type);
|
||||||
|
|
Loading…
Reference in New Issue