From a184831c30b5d125d48d2095abf1644f62953d30 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Mon, 24 Apr 2006 10:29:49 +0000 Subject: [PATCH] avoid NPE git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@396503 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/web/MessageServletSupport.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java index 6fd650e87c..d264971d2b 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java @@ -115,7 +115,11 @@ public abstract class MessageServletSupport extends HttpServlet { protected void appendParametersToMessage(HttpServletRequest request, TextMessage message) throws JMSException { - Map parameters = new HashMap(request.getParameterMap()); + Map parameterMap = request.getParameterMap(); + if (parameterMap == null) { + return; + } + Map parameters = new HashMap(parameterMap); String correlationID = asString(parameters.remove("JMSCorrelationID")); if (correlationID != null) { message.setJMSCorrelationID(correlationID); @@ -160,6 +164,7 @@ public abstract class MessageServletSupport extends HttpServlet { } } } + } protected Destination asDestination(Object value) {