servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r429375 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
Date Mon, 07 Aug 2006 16:00:48 GMT
Author: gnodet
Date: Mon Aug  7 09:00:48 2006
New Revision: 429375

URL: http://svn.apache.org/viewvc?rev=429375&view=rev
Log:
SM-518: MessageExchangeFactoryImpl.setDefaults(MessageExchangeImpl exchange) check for null


Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java?rev=429375&r1=429374&r2=429375&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
Mon Aug  7 09:00:48 2006
@@ -249,17 +249,19 @@
 
     protected void setDefaults(MessageExchangeImpl exchange) {
         exchange.setOperation(getOperationName());
-        if (endpoint != null){
+        if (endpoint != null) {
             exchange.setEndpoint(getEndpoint());
-        }else {
+        } else {
             exchange.setService(serviceName);
             exchange.setInterfaceName(interfaceName);
         }
-        
-        exchange.setSourceContext(getContext());
-        PojoMarshaler marshaler = getContext().getActivationSpec().getMarshaler();
-        if (marshaler != null) {
-            exchange.setMarshaler(marshaler);
+
+        if (getContext() != null) {
+            exchange.setSourceContext(getContext());
+            PojoMarshaler marshaler = getContext().getActivationSpec().getMarshaler();
+            if (marshaler != null) {
+                exchange.setMarshaler(marshaler);
+            }
         }
         exchange.setProperty(JbiConstants.DATESTAMP_PROPERTY_NAME, Calendar.getInstance());
     }



Mime
View raw message