activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r399333 - /incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
Date Wed, 03 May 2006 15:25:20 GMT
Author: jstrachan
Date: Wed May  3 08:25:17 2006
New Revision: 399333

URL: http://svn.apache.org/viewcvs?rev=399333&view=rev
Log:
ignore empty parameters

Modified:
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java

Modified: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java?rev=399333&r1=399332&r2=399333&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
(original)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
Wed May  3 08:25:17 2006
@@ -170,7 +170,7 @@
 
     protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException
{
         message.setJMSCorrelationID(JMSCorrelationID);
-        if (JMSReplyTo != null) {
+        if (JMSReplyTo != null && JMSReplyTo.trim().length() > 0) {
             message.setJMSReplyTo(ActiveMQDestination.createDestination(JMSReplyTo, ActiveMQDestination.QUEUE_TYPE));
         }
         message.setJMSType(JMSType);
@@ -190,6 +190,15 @@
                         }
                         else {
                             value = null;
+                        }
+                    }
+                    if (value instanceof String) {
+                        String text = value.toString().trim();
+                        if (text.length() == 0) {
+                            value = null;
+                        }
+                        else {
+                            value = text;
                         }
                     }
                     if (value != null) {



Mime
View raw message