From 4d1c5965ed71a2786f6274cebf7cfbef12b91e3d Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 31 Jan 2024 13:26:09 -0500 Subject: [PATCH] KafkaBinderConfigurationProperties cleanup - Address deprecation - Minor cleanup --- .../properties/KafkaBinderConfigurationProperties.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java index 655cd1c5c..76f1dc9ab 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2023 the original author or authors. + * Copyright 2015-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -376,8 +376,7 @@ public class KafkaBinderConfigurationProperties { * @return the merged properties. */ public Map mergedConsumerConfiguration() { - Map consumerConfiguration = new HashMap<>(); - consumerConfiguration.putAll(this.kafkaProperties.buildConsumerProperties()); + Map consumerConfiguration = new HashMap<>(this.kafkaProperties.buildConsumerProperties(null)); // Copy configured binder properties that apply to consumers for (Map.Entry configurationEntry : this.configuration .entrySet()) { @@ -401,8 +400,7 @@ public class KafkaBinderConfigurationProperties { * @return the merged properties. */ public Map mergedProducerConfiguration() { - Map producerConfiguration = new HashMap<>(); - producerConfiguration.putAll(this.kafkaProperties.buildProducerProperties()); + Map producerConfiguration = new HashMap<>(this.kafkaProperties.buildProducerProperties(null)); // Copy configured binder properties that apply to producers for (Map.Entry configurationEntry : this.configuration .entrySet()) {