You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2016/01/08 04:56:39 UTC

[jira] [Updated] (GEODE-94) Compilation under JDK 8 fails due to ambiguous method calls

     [ https://issues.apache.org/jira/browse/GEODE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anthony Baker updated GEODE-94:
-------------------------------
    Fix Version/s:     (was: 1.0.0-incubating)
                   1.0.0-alpha1

> Compilation under JDK 8 fails due to ambiguous method calls
> -----------------------------------------------------------
>
>                 Key: GEODE-94
>                 URL: https://issues.apache.org/jira/browse/GEODE-94
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>             Fix For: 1.0.0-alpha1
>
>
> If you change the build from JDK 7 compatible to straight JDK 8, the build fails due to ambiguous method calls.
> This is caused by improvements in JDK 8's Type Inference.
> See:
> 1 - https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html
> 2 - https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.5
> 3 - https://docs.oracle.com/javase/specs/jls/se8/html/jls-18.html#jls-18.5.1
> There are only 6 lines of code (at this time) in Geode that fail to build due to this. They are all calls to logger methods with (StringId, Object) parameters. Classes are:
> 1) FRAG2 (gemfire-jgroups) 
> 2) SMACK (gemfire-jgroups) 
> 3) UDP_NIO (gemfire-jgroups) 
> 4) VIEW_ENFORCER (gemfire-jgroups) 
> 5) JGroupMembershipManager (gemfire-core)
> Example from JGroups code:
> if(log.isInfoEnabled()) log.info(ExternalStrings.UDP_NIO_RECEIVED_CONFIG_EVENT__0, evt.getArg());
> This can be fixed simply by casting the 2nd argument to an Object:
> if(log.isInfoEnabled()) log.info(ExternalStrings.UDP_NIO_RECEIVED_CONFIG_EVENT__0, (Object)evt.getArg());



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