chia7712 commented on code in PR #19202: URL: https://github.com/apache/kafka/pull/19202#discussion_r1997212608
########## clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java: ########## @@ -2473,4 +2414,57 @@ private void shutdownExecutorService(ExecutorService service) { Thread.currentThread().interrupt(); } } + + private static class SerializerImpl implements Serializer<byte[]> { + private final ByteArraySerializer serializer = new ByteArraySerializer(); Review Comment: SerializerImpl can implement all methods by itself without `ByteArraySerializer`, right? ########## clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java: ########## @@ -2473,4 +2414,57 @@ private void shutdownExecutorService(ExecutorService service) { Thread.currentThread().interrupt(); } } + + private static class SerializerImpl implements Serializer<byte[]> { + private final ByteArraySerializer serializer = new ByteArraySerializer(); + + @Override + public byte[] serialize(String topic, Headers headers, byte[] data) { + headers.add(KEY, VALUE.getBytes()); + return serializer.serialize(topic, data); + } + + @Override + public void configure(Map<String, ?> configs, boolean isKey) { + serializer.configure(configs, isKey); + } + + @Override + public void close() { + serializer.close(); + } + + @Override + public byte[] serialize(String topic, byte[] data) { + fail("method should not be invoked"); + return null; + } + } + + private static class DeserializerImpl implements Deserializer<byte[]> { + private final ByteArrayDeserializer deserializer = new ByteArrayDeserializer(); Review Comment: ditto -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org