Author: veithen Date: Mon Jan 16 09:39:37 2017 New Revision: 1779000 URL: http://svn.apache.org/viewvc?rev=1779000&view=rev Log: Remove unnecessary code.
Modified: axis/axis2/java/core/trunk/modules/transport/http-hc3/src/main/java/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java Modified: axis/axis2/java/core/trunk/modules/transport/http-hc3/src/main/java/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http-hc3/src/main/java/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java?rev=1779000&r1=1778999&r2=1779000&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/http-hc3/src/main/java/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http-hc3/src/main/java/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java Mon Jan 16 09:39:37 2017 @@ -109,12 +109,10 @@ public class HTTPSenderImpl extends HTTP return new GetRequest(this, msgContext, soapActiionString, url, messageFormatter); } - protected void cleanup(MessageContext msgContext, Object httpMmethod) { - if (httpMmethod instanceof HttpMethod) { - if (msgContext.isPropertyTrue(HTTPConstants.AUTO_RELEASE_CONNECTION)) { - log.trace("AutoReleasing " + httpMmethod); - ((HttpMethod) httpMmethod).releaseConnection(); - } + protected void cleanup(MessageContext msgContext, HttpMethod httpMmethod) { + if (msgContext.isPropertyTrue(HTTPConstants.AUTO_RELEASE_CONNECTION)) { + log.trace("AutoReleasing " + httpMmethod); + ((HttpMethod) httpMmethod).releaseConnection(); } } Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java?rev=1779000&r1=1778999&r2=1779000&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java Mon Jan 16 09:39:37 2017 @@ -79,10 +79,6 @@ public abstract class HTTPSender extends protected abstract Request preparePut(MessageContext msgContext, URL url, String soapActionString, MessageFormatter messageFormatter) throws AxisFault; - protected abstract void cleanup(MessageContext msgContext, Object httpMethod); - - - public void send(MessageContext msgContext, URL url, String soapActionString) throws IOException { Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java?rev=1779000&r1=1778999&r2=1779000&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java Mon Jan 16 09:39:37 2017 @@ -121,15 +121,7 @@ public class HTTPSenderImpl extends HTTP return new GetRequest(this, msgContext, soapActionString, url, messageFormatter); } - @Override - protected void cleanup(MessageContext msgContext, Object httpResponse) { - HttpResponse response; - if (httpResponse instanceof HttpResponse) { - response = (HttpResponse) httpResponse; - } else { - log.trace("HttpResponse expected, but found - " + httpResponse); - return; - } + protected void cleanup(MessageContext msgContext, HttpResponse response) { if (msgContext.isPropertyTrue(HTTPConstants.CLEANUP_RESPONSE)) { log.trace("Cleaning response : " + response); HttpEntity entity = response.getEntity();