avoid unnecessary map creation

This commit is contained in:
Noble Paul 2016-09-28 11:34:31 +05:30
parent 09890f7f93
commit 7afa220e48
1 changed files with 3 additions and 4 deletions

View File

@ -230,10 +230,9 @@ public class ConfigOverlay implements MapSerializable {
@Override
public Map<String, Object> toMap(Map<String, Object> map) {
Map result = new LinkedHashMap();
result.put(ZNODEVER, znodeVersion);
result.putAll(data);
return result;
map.put(ZNODEVER, znodeVersion);
map.putAll(data);
return map;
}
public Map<String, Map> getNamedPlugins(String typ) {