|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
|
* Copyright 2002-2020 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -24,6 +24,7 @@ import org.springframework.http.client.ClientHttpRequestFactory;
@@ -24,6 +24,7 @@ import org.springframework.http.client.ClientHttpRequestFactory;
|
|
|
|
|
import org.springframework.http.client.ClientHttpRequestInterceptor; |
|
|
|
|
import org.springframework.http.client.InterceptingClientHttpRequestFactory; |
|
|
|
|
import org.springframework.lang.Nullable; |
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -57,6 +58,7 @@ public abstract class InterceptingHttpAccessor extends HttpAccessor {
@@ -57,6 +58,7 @@ public abstract class InterceptingHttpAccessor extends HttpAccessor {
|
|
|
|
|
* @see AnnotationAwareOrderComparator |
|
|
|
|
*/ |
|
|
|
|
public void setInterceptors(List<ClientHttpRequestInterceptor> interceptors) { |
|
|
|
|
Assert.noNullElements(interceptors, "'interceptors' must not contain null elements"); |
|
|
|
|
// Take getInterceptors() List as-is when passed in here
|
|
|
|
|
if (this.interceptors != interceptors) { |
|
|
|
|
this.interceptors.clear(); |
|
|
|
|
|