From 763ef103d8508376e3f84576f57340d6d8c57dea Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 2 Nov 2009 09:02:38 +0000 Subject: [PATCH] apply patch for https://issues.apache.org/activemq/browse/AMQ-2472 with thanks git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@831827 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/ProducerFlowControlSendFailTest.java | 1 - .../activemq/transport/http/HttpClientTransport.java | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java b/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java index 519190fd6b..6fdac73dab 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java @@ -18,7 +18,6 @@ package org.apache.activemq; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; import javax.jms.ConnectionFactory; import javax.jms.ExceptionListener; diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java index 6bbe16dcb3..604150cfa3 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java @@ -30,15 +30,12 @@ import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.ServiceStopper; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethod; -import org.apache.commons.httpclient.HttpMethodRetryHandler; import org.apache.commons.httpclient.HttpStatus; -import org.apache.commons.httpclient.NoHttpResponseException; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.HeadMethod; import org.apache.commons.httpclient.methods.InputStreamRequestEntity; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params.HttpClientParams; -import org.apache.commons.httpclient.params.HttpMethodParams; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -199,7 +196,9 @@ public class HttpClientTransport extends HttpTransportSupport { } protected void doStop(ServiceStopper stopper) throws Exception { - httpMethod.abort(); + if (httpMethod != null) { + httpMethod.abort(); + } } protected HttpClient createHttpClient() {