Skip to content

Commit 9aabfbe

Browse files
authored
Merge pull request #3011 from kurthong/BindingServiceProperties.bindings-property-should-be-thread-safe
Ensuring Thread-Safety for BindingServiceProperties.bindings
2 parents 2f4ae47 + fd20513 commit 9aabfbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.HashMap;
2121
import java.util.List;
2222
import java.util.Map;
23-
import java.util.TreeMap;
23+
import java.util.concurrent.ConcurrentSkipListMap;
2424

2525
import com.fasterxml.jackson.annotation.JsonInclude;
2626
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -53,6 +53,7 @@
5353
* @author Ilayaperumal Gopinathan
5454
* @author Oleg Zhurakousky
5555
* @author Michael Michailidis
56+
* @author Kurt Hong
5657
*/
5758
@ConfigurationProperties("spring.cloud.stream")
5859
@JsonInclude(Include.NON_DEFAULT)
@@ -115,7 +116,7 @@ public class BindingServiceProperties
115116
* For example; This sets the content-type for the 'input' binding of a Sink
116117
* application: 'spring.cloud.stream.bindings.input.contentType=text/plain'
117118
*/
118-
private Map<String, BindingProperties> bindings = new TreeMap<>(
119+
private Map<String, BindingProperties> bindings = new ConcurrentSkipListMap(
119120
String.CASE_INSENSITIVE_ORDER);
120121

121122
/**

0 commit comments

Comments
 (0)