Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 002DE200C67 for ; Mon, 15 May 2017 12:57:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F2EA9160BC2; Mon, 15 May 2017 10:57:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 445F7160BC1 for ; Mon, 15 May 2017 12:57:08 +0200 (CEST) Received: (qmail 50334 invoked by uid 500); 15 May 2017 10:57:07 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 50323 invoked by uid 99); 15 May 2017 10:57:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 May 2017 10:57:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E2480185F83 for ; Mon, 15 May 2017 10:57:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Tt8VkPy3zOfN for ; Mon, 15 May 2017 10:57:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D6DE55FB06 for ; Mon, 15 May 2017 10:57:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 29F58E02CA for ; Mon, 15 May 2017 10:57:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 10EDE242EF for ; Mon, 15 May 2017 10:57:04 +0000 (UTC) Date: Mon, 15 May 2017 10:57:04 +0000 (UTC) From: "Niclas Hedhman (JIRA)" To: dev@polygene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (POLYGENE-251) Support Java 8 default methods on interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 15 May 2017 10:57:09 -0000 [ https://issues.apache.org/jira/browse/POLYGENE-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16010318#comment-16010318 ] Niclas Hedhman commented on POLYGENE-251: ----------------------------------------- Oh, it happens for the greeting() method, which shouldn't be applied... Ok, so the AppliesToFilter is not working? The InterfaceDefaultMethodsMixin should have been appliedTo the greetings() method. Must have been doing something wrong there. Yes, the AppliesToFilter is never consulted. Hmmm... Ahhhh. I think I have found a different bug. When the concern is doing greetings(), it is not calling the Composite's greetings() method, but the underlying Mixin's greetings() method, which in this case doesn't exist. And in the case of abstract Mixin implementation classes, those methods are autogenerated, and all methods are overridden in mixin implementation classes, to delegate back to the Composite's methods. So, it is actually a edge case of what the GenericFragmentInvocationHandler should do (now it calls "down" and not the composite's method) and it just happens to work the way it is written. So to make this work, the InterfaceDefaultMethodMixin needs to check if it is supposed to handle a method coming, and if not, then delegate back to that method on the Composite. YES! That worked. > Support Java 8 default methods on interfaces > -------------------------------------------- > > Key: POLYGENE-251 > URL: https://issues.apache.org/jira/browse/POLYGENE-251 > Project: Polygene > Issue Type: Bug > Reporter: Paul Merlin > Assignee: Niclas Hedhman > Priority: Blocker > Fix For: 3.0 > > > The following composite declaration: > {code} > public interface DefaultMethods > { > default String sayHello( String name ) > { > return "Hello, " + name + '!'; > } > } > {code} > fails at assembly with: > {code} > Composition Problems Report: > message: No implementation found for method > method: String sayHello(String name) > {code} > See {{InterfaceDefaultMethodsTest}} in {{core/runtime}} > Also see POLYGENE-120 for some preliminary investigation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)