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

commit cb75125756896bc9e28a11f1aac778932cba256f
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Mar 3 08:54:39 2021 +0100

    CAMEL-16286: camel-core - Calling doBuild on child services
---
 .../org/apache/camel/support/EventDrivenPollingConsumer.java     | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/EventDrivenPollingConsumer.java
 
b/core/camel-support/src/main/java/org/apache/camel/support/EventDrivenPollingConsumer.java
index 67dc256..1ee98f4 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/EventDrivenPollingConsumer.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/EventDrivenPollingConsumer.java
@@ -231,12 +231,8 @@ public class EventDrivenPollingConsumer extends 
PollingConsumerSupport implement
     @Override
     protected void doBuild() throws Exception {
         super.doBuild();
-        // lets add ourselves as a consumer
+        // lets add ourselves as a consumer (only create do not build)
         consumer = createConsumer();
-        // do not call build if its our-self
-        if (consumer != this) {
-            ServiceHelper.buildService(consumer);
-        }
     }
 
     @Override
@@ -247,9 +243,6 @@ public class EventDrivenPollingConsumer extends 
PollingConsumerSupport implement
 
     @Override
     protected void doStart() throws Exception {
-        // lets add ourselves as a consumer
-        consumer = createConsumer();
-
         // if the consumer has a polling strategy then invoke that
         if (consumer instanceof PollingConsumerPollingStrategy) {
             PollingConsumerPollingStrategy strategy = 
(PollingConsumerPollingStrategy) consumer;

Reply via email to