You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/07/10 08:19:18 UTC

[camel] branch master updated: CAMEL-12610: Revert part of the bean fix as this breaks old behavior. Working on a improved fix.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 6422d41  CAMEL-12610: Revert part of the bean fix as this breaks old behavior. Working on a improved fix.
6422d41 is described below

commit 6422d41eece93b363905c04c531340b91d0611d3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jul 10 09:43:57 2018 +0200

    CAMEL-12610: Revert part of the bean fix as this breaks old behavior. Working on a improved fix.
---
 .../org/apache/camel/component/bean/AbstractBeanProcessor.java     | 2 +-
 .../src/test/java/org/apache/camel/processor/BeanCachedTest.java   | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index 173f89d..fd4803a 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -93,7 +93,7 @@ public abstract class AbstractBeanProcessor implements AsyncProcessor {
         // do we have a custom adapter for this POJO to a Processor
         // but only do this if allowed
         // we need to check beanHolder is Processor is support, to avoid the bean cached issue
-        if (allowProcessor(explicitMethodName, beanInfo) && beanHolder.supportProcessor()) {
+        if (allowProcessor(explicitMethodName, beanInfo)) {
             processor = getProcessor();
             if (processor == null && !lookupProcessorDone) {
                 // only attempt to lookup the processor once or nearly once
diff --git a/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
index f9cfcb4..7b7a378 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
@@ -16,14 +16,11 @@
  */
 package org.apache.camel.processor;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.naming.Context;
 
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
 import org.junit.Test;
@@ -88,10 +85,10 @@ public class BeanCachedTest extends ContextTestSupport {
     }
 
 
-    public static class MyBean implements Processor {
+    public static class MyBean {
         private boolean invoked;
 
-        public void process(Exchange exchange) throws Exception {
+        public void doSomething(Exchange exchange) throws Exception {
             if (invoked) {
                 throw new IllegalStateException("This bean is not supported to be invoked again!");
             } else {