hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1427777 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
Date Wed, 02 Jan 2013 13:04:49 GMT
Author: olegk
Date: Wed Jan  2 13:04:48 2013
New Revision: 1427777

URL: http://svn.apache.org/viewvc?rev=1427777&view=rev
Log:
Fixed a problem introduced by the previous commit: abort lock needs to be created new when
the object is cloned

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java?rev=1427777&r1=1427776&r2=1427777&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
Wed Jan  2 13:04:48 2013
@@ -41,7 +41,7 @@ import org.apache.http.message.AbstractH
 public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage implements
         HttpExecutionAware, AbortableHttpRequest, Cloneable, HttpRequest {
 
-    private final Lock abortLock;
+    private Lock abortLock;
     private volatile boolean aborted;
     private volatile Cancellable cancellable;
 
@@ -138,6 +138,9 @@ public abstract class AbstractExecutionA
         AbstractExecutionAwareRequest clone = (AbstractExecutionAwareRequest) super.clone();
         clone.headergroup = CloneUtils.cloneObject(this.headergroup);
         clone.params = CloneUtils.cloneObject(this.params);
+        clone.abortLock = new ReentrantLock();
+        clone.cancellable = null;
+        clone.aborted = false;
         return clone;
     }
 



Mime
View raw message