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 5271E200CC2 for ; Wed, 5 Jul 2017 13:00:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 50F88162F20; Wed, 5 Jul 2017 11:00:07 +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 954F7162F1F for ; Wed, 5 Jul 2017 13:00:06 +0200 (CEST) Received: (qmail 19762 invoked by uid 500); 5 Jul 2017 11:00:05 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 19753 invoked by uid 99); 5 Jul 2017 11:00:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 11:00:05 +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 59960C0620 for ; Wed, 5 Jul 2017 11:00:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 4CSxkCTFRixO for ; Wed, 5 Jul 2017 11:00:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2B1DA5FAEA for ; Wed, 5 Jul 2017 11:00:02 +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 13D0DE07DD for ; Wed, 5 Jul 2017 11:00:01 +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 1321E2461C for ; Wed, 5 Jul 2017 11:00:00 +0000 (UTC) Date: Wed, 5 Jul 2017 11:00:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-11511) Camel bean binding issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Jul 2017 11:00:07 -0000 [ https://issues.apache.org/jira/browse/CAMEL-11511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074577#comment-16074577 ] ASF GitHub Bot commented on CAMEL-11511: ---------------------------------------- Github user aldettinger closed the pull request at: https://github.com/apache/camel/pull/1804 > Camel bean binding issues > ------------------------- > > Key: CAMEL-11511 > URL: https://issues.apache.org/jira/browse/CAMEL-11511 > Project: Camel > Issue Type: Bug > Components: camel-core > Reporter: Alex Dettinger > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.20.0 > > > Tests below show 2 issues in the bean binding: > {code:java} > public class PrivatePackageClassBeanInfoTest extends CamelTestSupport { > @EndpointInject(uri = "mock:result") > protected MockEndpoint mockResult; > public static interface IA { > public String method(); > } > public static interface IB extends IA { > public String method1(); > } > class C implements IB { > @Override > public String method() { > return "C.method() has been called"; > } > @Override > public String method1() { > return "C.method1() has been called"; > } > } > public static interface IBC { > public String method(); > } > class D { > public String method() { > return "D.method() has been called"; > } > } > public class E extends D implements IBC { > } > @Test > public void getInterfaceMethodsMessUpWithMultipleLevelOfInterface() throws InterruptedException { > mockResult.expectedBodiesReceived("C.method() has been called"); > template.sendBodyAndProperty("direct:test", "", "myObject", new C()); > mockResult.assertIsSatisfied(); > } > @Test > public void interfaceMethodImplementedByPackagePrivateUpperClassFails() throws InterruptedException { > System.out.println(Modifier.isPublic(E.class.getModifiers())); > mockResult.expectedBodiesReceived("D.method() has been called"); > template.sendBodyAndProperty("direct:test", "", "myObject", new E()); > mockResult.assertIsSatisfied(); > } > @Override > public RouteBuilder createRouteBuilder() { > return new RouteBuilder() { > @Override > public void configure() throws Exception { > from("direct:test").setBody(simple("${exchangeProperty.myObject.method}")).to(mockResult); > } > }; > } > } > {code} > Below messages are logged: > {noformat} > logged:org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: method on null due to: org.apache.camel.RuntimeExchangeException: IllegalAccessException occurred invoking method: public java.lang.String PrivatePackageClassBeanInfoTest$D.method() using arguments: [] on the exchange: Exchange[] > {noformat} > {noformat} > org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: method on null due to: org.apache.camel.RuntimeExchangeException: IllegalAccessException occurred invoking method: public java.lang.String PrivatePackageClassBeanInfoTest$C.method() using arguments: [] on the exchange: Exchange[] > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)