Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-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 6ED8817B04 for ; Tue, 1 Sep 2015 06:59:51 +0000 (UTC) Received: (qmail 6683 invoked by uid 500); 1 Sep 2015 06:59:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 6592 invoked by uid 500); 1 Sep 2015 06:59:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 6578 invoked by uid 99); 1 Sep 2015 06:59:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 06:59:45 +0000 Date: Tue, 1 Sep 2015 06:59:45 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OGNL-249) Ognl.GetMethods does not return default methods in interfaces (new java 8 feature) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OGNL-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated OGNL-249: ------------------------------- Fix Version/s: (was: 4.0) 3.0.12 > Ognl.GetMethods does not return default methods in interfaces (new java 8 feature) > ---------------------------------------------------------------------------------- > > Key: OGNL-249 > URL: https://issues.apache.org/jira/browse/OGNL-249 > Project: Commons OGNL > Issue Type: Bug > Components: Core Runtime > Affects Versions: 3.0 > Environment: Java 8, OSX, likely all environments tho. > Reporter: Tim Wright > Fix For: 3.0.12 > > > Hi, > I'm a contributor to an open source automated test framework called "Concordion". We use OGNL internally to evaulate test specifications. One of our users has reported a bug where Concordion cannot call default interface methods. We've traced the problem to OGNL - the OgnlRuntime.getMethods method is not returning default implementations of interface methods. We've verified the behaviour in OGNL versions 2.6.9 and 3.0.9. > Consider the following interface and junit test file. The test fails. But it probably should not. > {code:java} > // INTERFACE > package org.concordion; > public interface InterfaceWithDefaults { > default public void defaultMethod() { } > } > {code} > {code:java} > // TEST CLASS > package org.concordion; > import ognl.OgnlRuntime; > import org.junit.Test; > import static org.junit.Assert.assertNotNull; > public class TestDefaultMethods implements InterfaceWithDefaults { > @Test > public void testDefaultMethod() { > defaultMethod(); > assertNotNull(OgnlRuntime.getMethods(TestDefaultMethods.class, "defaultMethod", false)); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)