camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/3] camel git commit: CAMEL-8527: Processor in routes should be IdAware
Date Sat, 18 Apr 2015 09:03:43 GMT
CAMEL-8527: Processor in routes should be IdAware


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f911084f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f911084f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f911084f

Branch: refs/heads/master
Commit: f911084fc865bb4752fc3cf68797b88ef19da2b4
Parents: e920731
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Apr 18 10:58:57 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Apr 18 10:58:57 2015 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/model/ProcessorDefinition.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f911084f/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index f3122d7..214057e 100644
--- a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -447,7 +447,8 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
 
             // inject id
             if (processor instanceof IdAware) {
-                ((IdAware) processor).setId(output.getId());
+                String id = output.idOrCreate(routeContext.getCamelContext().getNodeIdFactory());
+                ((IdAware) processor).setId(id);
             }
 
             if (output instanceof Channel && processor == null) {
@@ -535,7 +536,8 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
 
         // inject id
         if (processor instanceof IdAware) {
-            ((IdAware) processor).setId(this.getId());
+            String id = this.idOrCreate(routeContext.getCamelContext().getNodeIdFactory());
+            ((IdAware) processor).setId(id);
         }
 
         if (processor == null) {


Mime
View raw message