camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r774164 - in /camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration: SpringIntegrationExchange.java adapter/CamelTargetAdapter.java
Date Wed, 13 May 2009 02:02:39 GMT
Author: ningjiang
Date: Wed May 13 02:02:39 2009
New Revision: 774164

URL: http://svn.apache.org/viewvc?rev=774164&view=rev
Log:
Fixed the test error of camel-spring-integration

Modified:
    camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationExchange.java
    camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java

Modified: camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationExchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationExchange.java?rev=774164&r1=774163&r2=774164&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationExchange.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationExchange.java
Wed May 13 02:02:39 2009
@@ -50,27 +50,11 @@
 
     @Override
     public Exchange newInstance() {
-        return new SpringIntegrationExchange(getFromSpringIntegrationEndpoint());
-    }
-
-    @Override
-    public SpringIntegrationMessage getIn() {
-        return (SpringIntegrationMessage) super.getIn();
-    }
-
-    @Override
-    public SpringIntegrationMessage getOut() {
-        return (SpringIntegrationMessage) super.getOut();
-    }
-
-    @Override
-    public SpringIntegrationMessage getOut(boolean lazyCreate) {
-        return (SpringIntegrationMessage) super.getOut(lazyCreate);
-    }
-
-    @Override
-    public SpringIntegrationMessage getFault() {
-        return (SpringIntegrationMessage) super.getFault();
+        if (getFromSpringIntegrationEndpoint() != null) {
+            return new SpringIntegrationExchange(getFromSpringIntegrationEndpoint());
+        } else {
+            return new DefaultExchange(this.getContext(), this.getPattern());
+        }
     }
 
     @Override

Modified: camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java?rev=774164&r1=774163&r2=774164&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
Wed May 13 02:02:39 2009
@@ -74,7 +74,7 @@
         } else {
             pattern = ExchangePattern.InOnly;
         }
-        Exchange inExchange = new SpringIntegrationExchange(this, pattern);
+        Exchange inExchange = new SpringIntegrationExchange(this, pattern);        
         SpringIntegrationBinding.storeToCamelMessage(message, inExchange.getIn());
         Exchange outExchange = getCamelTemplate().send(getCamelEndpointUri(), inExchange);
         if (outExchange.getFault() != null) {



Mime
View raw message