[ https://issues.apache.org/jira/browse/KAFKA-6018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ewen Cheslack-Postava resolved KAFKA-6018. ------------------------------------------ Resolution: Fixed Fix Version/s: 1.1.0 Issue resolved by pull request 4033 [https://github.com/apache/kafka/pull/4033] > Make KafkaFuture.Function java 8 lambda compatible > -------------------------------------------------- > > Key: KAFKA-6018 > URL: https://issues.apache.org/jira/browse/KAFKA-6018 > Project: Kafka > Issue Type: Bug > Components: clients > Reporter: Steven Aerts > Priority: Major > Fix For: 1.1.0 > > > KafkaFuture.Function is currently an empty public abstract class. > This means you cannot implement them as a java lambda. And you end up with > constructs as: > {code:java} > new KafkaFuture.Function<Set<String>, Object>() { > @Override > public Object apply(Set<String> strings) { > return foo; > } > } > {code} > I propose to define them as interfaces. > So this code can become in java 8: > {code:java} > strings -> foo > {code} > I know this change is backwards incompatible (extends becomes implements). > But as {{KafkaFuture}} is marked as {{@InterfaceStability.Evolving}}. > And KafkaFuture states in its javadoc: > {quote}This will eventually become a thin shim on top of Java 8's > CompletableFuture.{quote} > I think this change might be worth considering. -- This message was sent by Atlassian JIRA (v7.6.3#76005)