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 2019/02/06 11:26:48 UTC

[camel] branch master updated: camel3 - Remove old cruft

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 6db3c91  camel3 - Remove old cruft
6db3c91 is described below

commit 6db3c91672783b730b7f5d37368af48258fa56dd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Feb 6 12:18:28 2019 +0100

    camel3 - Remove old cruft
---
 .../apache/camel/model/InterceptSendToEndpointDefinition.java |  7 -------
 .../main/java/org/apache/camel/processor/SendProcessor.java   | 11 -----------
 2 files changed, 18 deletions(-)

diff --git a/core/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java b/core/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
index 44f68a8..5056362 100644
--- a/core/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
+++ b/core/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
@@ -33,13 +33,6 @@ import org.apache.camel.spi.Metadata;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class InterceptSendToEndpointDefinition extends OutputDefinition<InterceptSendToEndpointDefinition> {
 
-    // TODO: Support lookup endpoint by ref (requires a bit more work)
-
-    // TODO: interceptSendToEndpoint needs to proxy the endpoints at very first
-    // so when other processors uses an endpoint its already proxied, see workaround in SendProcessor
-    // needed when we haven't proxied beforehand. This requires some work in the route builder in Camel
-    // to implement so that should be a part of a bigger rework/improvement in the future
-
     @XmlAttribute(required = true)
     private String uri;
     @XmlAttribute
diff --git a/core/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java b/core/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
index 9257704..51e5f41 100644
--- a/core/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
+++ b/core/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
@@ -29,7 +29,6 @@ import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.Traceable;
 import org.apache.camel.impl.DefaultProducerCache;
 import org.apache.camel.spi.IdAware;
-import org.apache.camel.spi.InterceptSendToEndpoint;
 import org.apache.camel.spi.ProducerCache;
 import org.apache.camel.support.AsyncProcessorSupport;
 import org.apache.camel.support.EndpointHelper;
@@ -203,16 +202,6 @@ public class SendProcessor extends AsyncProcessorSupport implements Traceable, E
         }
         ServiceHelper.startService(producerCache);
 
-        // the destination could since have been intercepted by a interceptSendToEndpoint so we got to
-        // lookup this before we can use the destination
-        Endpoint lookup = camelContext.hasEndpoint(destination.getEndpointKey());
-        if (lookup instanceof InterceptSendToEndpoint) {
-            if (log.isDebugEnabled()) {
-                log.debug("Intercepted sending to {} -> {}",
-                        URISupport.sanitizeUri(destination.getEndpointUri()), URISupport.sanitizeUri(lookup.getEndpointUri()));
-            }
-            destination = lookup;
-        }
         // warm up the producer by starting it so we can fail fast if there was a problem
         // however must start endpoint first
         ServiceHelper.startService(destination);