Make binding key case insensitive

- Use `TreeMap` for channel bindings and set case insensitive comparator for the tree map.
   - This way binding key (typically channel name) can be looked up case insensitively
This commit is contained in:
Ilayaperumal Gopinathan
2015-08-27 08:16:41 -07:00
parent a4aede7589
commit cf470b6d6f

View File

@@ -16,11 +16,10 @@
package org.springframework.cloud.stream.config;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -40,7 +39,7 @@ public class ChannelBindingProperties {
private Properties producerProperties = new Properties();
private Map<String,Object> bindings = new HashMap<>();
private Map<String,Object> bindings = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
public Properties getConsumerProperties() {
return this.consumerProperties;