ignore empty parameters

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@399333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-05-03 15:25:17 +00:00
parent 9ebe333816
commit 71669cba11
1 changed files with 10 additions and 1 deletions

View File

@ -170,7 +170,7 @@ public class SendMessage extends DestinationFacade implements Controller {
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);
@ -192,6 +192,15 @@ public class SendMessage extends DestinationFacade implements Controller {
value = null;
}
}
if (value instanceof String) {
String text = value.toString().trim();
if (text.length() == 0) {
value = null;
}
else {
value = text;
}
}
if (value != null) {
message.setObjectProperty(name, value);
}