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) {