Fixed potential thread-safety issue. Credits to Sebb
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@756157 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4726814033
commit
ac3eefa92a
|
@ -421,8 +421,7 @@ public abstract class AbstractHttpClient implements HttpClient {
|
|||
}
|
||||
|
||||
|
||||
// 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 @@ public abstract class AbstractHttpClient implements HttpClient {
|
|||
}
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue