[ https://issues.apache.org/jira/browse/KAFKA-6161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237785#comment-16237785 ]
ASF GitHub Bot commented on KAFKA-6161: --------------------------------------- GitHub user evis opened a pull request: https://github.com/apache/kafka/pull/4175 KAFKA-6161 add base classes for (De)Serializers with empty conf methods All (de)serializers, which have empty configure() and/or close() methods, are now inherit NoConf(De)Serializer. Also, such classes are created for extended (de)serializers. You can merge this pull request into a Git repository by running: $ git pull https://github.com/evis/kafka KAFKA-6161-serde-empty-conf-close-methods Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/4175.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4175 ---- commit 297115a53f6ea6c1bfd2383c0f73f011cb94c505 Author: Evgeny Veretennikov <evg.veretenni...@gmail.com> Date: 2017-11-03T15:38:18Z KAFKA-6161 add base classes for (De)Serializers with empty conf methods All (de)serializers, which have empty configure() and/or close() methods, are now inherit NoConf(De)Serializer. Also, such classes are created for extended (de)serializers. ---- > Introduce new serdes interfaces with empty configure() and close() > ------------------------------------------------------------------ > > Key: KAFKA-6161 > URL: https://issues.apache.org/jira/browse/KAFKA-6161 > Project: Kafka > Issue Type: Improvement > Components: clients > Reporter: Evgeny Veretennikov > Assignee: Evgeny Veretennikov > Priority: Normal > > {{Serializer}}, {{Deserializer}} and {{Serde}} interfaces have methods > {{configure()}} and {{close()}}. Pretty often one want to leave these methods > empty. For example, a lot of serializers inside > {{org.apache.kafka.common.serialization}} package have these methods empty: > {code} > @Override > public void configure(Map<String, ?> configs, boolean isKey) { > // nothing to do > } > @Override > public void close() { > // nothing to do > } > {code} > To avoid such boilerplate, we may create new interfaces (like > {{UnconfiguredSerializer}}), in which we will define these methods empty. -- This message was sent by Atlassian JIRA (v6.4.14#64029)