You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/18 22:17:26 UTC

[jira] [Commented] (KAFKA-4672) KIP-100 api changes break Java 8 lambda expressions in some cases

    [ https://issues.apache.org/jira/browse/KAFKA-4672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828861#comment-15828861 ] 

ASF GitHub Bot commented on KAFKA-4672:
---------------------------------------

GitHub user xvrl opened a pull request:

    https://github.com/apache/kafka/pull/2402

    KAFKA-4672 fix source compatibility for lambda expressions

    please cherry-pick into 0.10.2.x 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xvrl/kafka lambdas-oh-my

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2402.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 #2402
    
----
commit 070af889c64c2e78b458978c448b643fa3363a9b
Author: Xavier Léauté <xa...@confluent.io>
Date:   2017-01-18T21:53:10Z

    KAFKA-4672 fix source compatibility for lambda expressions

----


> KIP-100 api changes break Java 8 lambda expressions in some cases 
> ------------------------------------------------------------------
>
>                 Key: KAFKA-4672
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4672
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.10.2.0
>            Reporter: Xavier Léauté
>            Assignee: Xavier Léauté
>             Fix For: 0.10.2.0
>
>
> Variance changes introduced in KIP-100 cause compilation failures with lambda expression in Java 8.
> To my knowledge this only affects methods taking suppliers of functions
> KStreams.transform(TransformerSupplier<...>, String...)
> KStreams.transformValues(ValueTransformerSupplier<...>)
> prior to the changes it was possible to write
> streams.transform(MyTransformer::new)
> streams.transformValues(MyValueTransformer::new)
> where MyTransformer and MyValueTransformer extend Transformer and ValueTransformer respectively.
> After the changes the Java compiler is unable to infer correct return types for the lambda expression.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)