Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Maps;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -416,11 +417,11 @@ private Map<String, String> request(SubscriptionGroupConfig subscriptionGroupCon
private Map<String, String> current(String groupName) {
SubscriptionGroupConfig subscriptionGroupConfig = this.subscriptionGroupTable.get(groupName);
if (subscriptionGroupConfig == null) {
return new HashMap<>();
return Collections.emptyMap();
} else {
Map<String, String> attributes = subscriptionGroupConfig.getAttributes();
if (attributes == null) {
return new HashMap<>();
return Collections.emptyMap();
} else {
return attributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.rocketmq.broker.topic;

import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -750,11 +751,11 @@ private Map<String, String> request(TopicConfig topicConfig) {
private Map<String, String> current(String topic) {
TopicConfig topicConfig = getTopicConfig(topic);
if (topicConfig == null) {
return new HashMap<>();
return Collections.emptyMap();
} else {
Map<String, String> attributes = topicConfig.getAttributes();
if (attributes == null) {
return new HashMap<>();
return Collections.emptyMap();
} else {
return attributes;
}
Expand Down