chia7712 commented on a change in pull request #8605: URL: https://github.com/apache/kafka/pull/8605#discussion_r430420853
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java ########## @@ -573,18 +573,6 @@ private void maybeOverrideClientId(Map<String, Object> configs) { return newConfigs; } - public static Properties addDeserializerToConfig(Properties properties, Review comment: > did you get around to update the PR with a variant that removes the no-longer-used addDeserializerToConfig() method? done ! ########## File path: clients/src/test/java/org/apache/kafka/clients/producer/ProducerConfigTest.java ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.kafka.clients.producer; + +import org.apache.kafka.common.serialization.ByteArraySerializer; +import org.apache.kafka.common.serialization.Serializer; +import org.apache.kafka.common.serialization.StringSerializer; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class ProducerConfigTest { Review comment: This test is similar to ```ConsumerConfigTest``` ########## File path: clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java ########## @@ -480,18 +480,6 @@ private static String parseAcks(String acksString) { return newConfigs; } - public static Properties addSerializerToConfig(Properties properties, - Serializer<?> keySerializer, - Serializer<?> valueSerializer) { - Properties newProperties = new Properties(); - newProperties.putAll(properties); - if (keySerializer != null) - newProperties.put(KEY_SERIALIZER_CLASS_CONFIG, keySerializer.getClass().getName()); - if (valueSerializer != null) - newProperties.put(VALUE_SERIALIZER_CLASS_CONFIG, valueSerializer.getClass().getName()); - return newProperties; - } - Review comment: @ijuma Should I file a issue for this PR if a KIP is required ? ########## File path: clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java ########## @@ -480,18 +480,6 @@ private static String parseAcks(String acksString) { return newConfigs; } - public static Properties addSerializerToConfig(Properties properties, - Serializer<?> keySerializer, - Serializer<?> valueSerializer) { - Properties newProperties = new Properties(); - newProperties.putAll(properties); - if (keySerializer != null) - newProperties.put(KEY_SERIALIZER_CLASS_CONFIG, keySerializer.getClass().getName()); - if (valueSerializer != null) - newProperties.put(VALUE_SERIALIZER_CLASS_CONFIG, valueSerializer.getClass().getName()); - return newProperties; - } - Review comment: copy that! ########## File path: clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java ########## @@ -480,18 +480,6 @@ private static String parseAcks(String acksString) { return newConfigs; } - public static Properties addSerializerToConfig(Properties properties, - Serializer<?> keySerializer, - Serializer<?> valueSerializer) { - Properties newProperties = new Properties(); - newProperties.putAll(properties); - if (keySerializer != null) - newProperties.put(KEY_SERIALIZER_CLASS_CONFIG, keySerializer.getClass().getName()); - if (valueSerializer != null) - newProperties.put(VALUE_SERIALIZER_CLASS_CONFIG, valueSerializer.getClass().getName()); - return newProperties; - } - Review comment: the follow-up https://issues.apache.org/jira/browse/KAFKA-10044 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org