cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r910464 - in /cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms: JMSDestination.java JMSUtils.java
Date Tue, 16 Feb 2010 10:49:04 GMT
Author: sergeyb
Date: Tue Feb 16 10:49:04 2010
New Revision: 910464

URL: http://svn.apache.org/viewvc?rev=910464&view=rev
Log:
Minor update to JMS transport to ensure that messages with no entity body can be handled properly

Modified:
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=910464&r1=910463&r2=910464&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Tue Feb 16 10:49:04 2010
@@ -188,8 +188,10 @@
                                              JMSConstants.JMS_SERVER_REQUEST_HEADERS, jmsConfig);
             
             byte[] request = JMSUtils.retrievePayload(message, (String)inMessage.get(Message.ENCODING));
-            getLogger().log(Level.FINE, "The Request Message is [ " + request + "]");
-            inMessage.setContent(InputStream.class, new ByteArrayInputStream(request));
+            if (request != null) {
+                getLogger().log(Level.FINE, "The Request Message is [ " + request + "]");
+                inMessage.setContent(InputStream.class, new ByteArrayInputStream(request));
+            }
             inMessage.put(JMSConstants.JMS_SERVER_RESPONSE_HEADERS, new JMSMessageHeadersType());
             inMessage.put(JMSConstants.JMS_REQUEST_MESSAGE, message);
             inMessage.setDestination(this);

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=910464&r1=910463&r2=910464&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
Tue Feb 16 10:49:04 2010
@@ -129,7 +129,7 @@
         } else if (converted instanceof byte[]) {
             return (byte[])converted;
         } else {
-            return (byte[])converted; // TODO is this correct?
+            return null;
         }
     }
 



Mime
View raw message