camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r959731 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: model/FromDefinition.java model/SendDefinition.java view/GraphSupport.java
Date Thu, 01 Jul 2010 17:26:41 GMT
Author: jstrachan
Date: Thu Jul  1 17:26:41 2010
New Revision: 959731

URL: http://svn.apache.org/viewvc?rev=959731&view=rev
Log:
fix for CAMEL-2893 so that getUriOrRef will return non-null when there is a URI defined

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SendDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphSupport.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromDefinition.java?rev=959731&r1=959730&r2=959731&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromDefinition.java Thu Jul
 1 17:26:41 2010
@@ -119,7 +119,7 @@ public class FromDefinition extends Opti
      * Returns the endpoint URI or the name of the reference to it
      */
     public Object getUriOrRef() {
-        if (ObjectHelper.isEmpty(uri)) {
+        if (ObjectHelper.isNotEmpty(uri)) {
             return uri;
         } else if (endpoint != null) {
             return endpoint.getEndpointUri();

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SendDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SendDefinition.java?rev=959731&r1=959730&r2=959731&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SendDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SendDefinition.java Thu Jul
 1 17:26:41 2010
@@ -105,7 +105,7 @@ public abstract class SendDefinition<Typ
      */
     public Object getUriOrRef() {
         String uri = getUri();
-        if (ObjectHelper.isEmpty(uri)) {
+        if (ObjectHelper.isNotEmpty(uri)) {
             return uri;
         } else if (endpoint != null) {
             return endpoint.getEndpointUri();

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphSupport.java?rev=959731&r1=959730&r2=959731&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphSupport.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphSupport.java Thu Jul 
1 17:26:41 2010
@@ -67,7 +67,10 @@ public class GraphSupport {
             ToDefinition toType = (ToDefinition) node;
             key = toType.getUriOrRef();
         }
-        NodeData answer = nodeMap.get(key);
+        NodeData answer = null;
+        if (key != null) {
+            answer = nodeMap.get(key);
+        }
         if (answer == null) {
             String id = "node" + (nodeMap.size() + 1);
             answer = new NodeData(id, node, imagePrefix);



Mime
View raw message