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

ASF GitHub Bot commented on FLINK-5067:
---------------------------------------

GitHub user melentye opened a pull request:

    https://github.com/apache/flink/pull/2804

    [FLINK-5067] Make Flink compile with 1.8 Java compiler

    - New type inference rules changed which overloaded methods are picked.
    - Renamed java.version property in maven to java.minor.version. This is due 
to the fact that overriding java.version is used by some third-party classes 
and they expect the version to be fully qualified.
    - Introduced Java 8 build for Travis CI

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

    $ git pull https://github.com/melentye/flink 
FLINK-5067-make-flink-compile-with-java8-compiler

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

    https://github.com/apache/flink/pull/2804.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 #2804
    
----
commit f07215eed4269826e57136fa30560a34b8409d34
Author: Andrey Melentyev <andrey.melent...@klarna.com>
Date:   2016-11-13T16:42:17Z

    [FLINK-5067] Java 8 build fixes
    
    - New type inference rules changed which overloaded methods are picked.
    - Renamed java.version property in maven to java.minor.version. This is due 
to the fact that overriding java.version is used by some third-party classes 
and they expect the version to be fully qualified.
    - Introduced Java 8 build for Travis CI

----


> Make Flink compile with 1.8 Java compiler
> -----------------------------------------
>
>                 Key: FLINK-5067
>                 URL: https://issues.apache.org/jira/browse/FLINK-5067
>             Project: Flink
>          Issue Type: Improvement
>          Components: Build System
>    Affects Versions: 1.2.0
>         Environment: macOS Sierra 10.12.1, java version "1.8.0_112", Apache 
> Maven 3.3.9
>            Reporter: Andrey Melentyev
>            Priority: Minor
>
> Flink fails to compile when using 1.8 as source and target in Maven. There 
> are two types of issue that are both related to the new type inference rules:
> * Call to TypeSerializer.copy method in TupleSerializer.java:112 now resolves 
> to a different overload than before causing a compilation error: [ERROR] 
> /Users/andrey.melentyev/Dev/github.com/apache/flink/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/TupleSerializer.java:[112,63]
>  incompatible types: void cannot be converted to java.lang.Object
> * A number of unit tests using assertEquals fail to compile:
> [ERROR] 
> /Users/andrey.melentyev/Dev/github.com/apache/flink/flink-java/src/test/java/org/apache/flink/api/common/operators/CollectionExecutionAccumulatorsTest.java:[50,25]
>  reference to assertEquals is ambiguous
> [ERROR] both method assertEquals(long,long) in org.junit.Assert and method 
> assertEquals(java.lang.Object,java.lang.Object) in org.junit.Assert match
> In both of the above scenarios explicitly casting one of the arguments helps 
> the compiler to resolve overloaded method call correctly.
> It is possible to maintain Flink's code base in a state when it can be built 
> by both 1.7 and 1.8. For this purpose we need minor code fixes and an 
> automated build in Travis to keep the new good state.



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

Reply via email to