Return-Path: X-Original-To: apmail-geode-issues-archive@minotaur.apache.org Delivered-To: apmail-geode-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4171A18CDB for ; Fri, 10 Jul 2015 20:48:13 +0000 (UTC) Received: (qmail 67845 invoked by uid 500); 10 Jul 2015 20:48:13 -0000 Delivered-To: apmail-geode-issues-archive@geode.apache.org Received: (qmail 67812 invoked by uid 500); 10 Jul 2015 20:48:13 -0000 Mailing-List: contact issues-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list issues@geode.incubator.apache.org Received: (qmail 67801 invoked by uid 99); 10 Jul 2015 20:48:13 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jul 2015 20:48:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BA898C0711 for ; Fri, 10 Jul 2015 20:48:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.971 X-Spam-Level: X-Spam-Status: No, score=0.971 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id a6Xx13FL2SMm for ; Fri, 10 Jul 2015 20:48:06 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 5794420C9D for ; Fri, 10 Jul 2015 20:48:05 +0000 (UTC) Received: (qmail 67711 invoked by uid 99); 10 Jul 2015 20:48:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jul 2015 20:48:04 +0000 Date: Fri, 10 Jul 2015 20:48:04 +0000 (UTC) From: "Kirk Lund (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (GEODE-94) Compilation under JDK 8 fails due to ambiguous method calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Kirk Lund created GEODE-94: ------------------------------ Summary: 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 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)