hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r756157 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
Date Thu, 19 Mar 2009 19:53:53 GMT
Author: olegk
Date: Thu Mar 19 19:53:53 2009
New Revision: 756157

URL: http://svn.apache.org/viewvc?rev=756157&view=rev
Log:
Fixed potential thread-safety issue. Credits to Sebb

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java?rev=756157&r1=756156&r2=756157&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
Thu Mar 19 19:53:53 2009
@@ -421,8 +421,7 @@
     }
 
 
-    // TODO - should this be synch? Is remove MT safe?
-    public void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor>
clazz) {
+    public synchronized void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor>
clazz) {
         getHttpProcessor().removeResponseInterceptorByClass(clazz);
     }
 
@@ -452,8 +451,7 @@
     }
 
 
-    // TODO - should this be synch? Is remove MT safe?
-    public void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor>
clazz) {
+    public synchronized void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor>
clazz) {
         getHttpProcessor().removeRequestInterceptorByClass(clazz);
     }
 



Mime
View raw message