-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Closed as not planned
Copy link
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
Hello,
I have an inquiry regarding https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java#L181
The method is defined as
/**
* Return a new {@link HttpComponentsClientHttpRequestFactoryBuilder} that applies
* additional customization to the underlying
* {@link org.apache.hc.client5.http.config.RequestConfig.Builder} used for default
* requests.
* @param defaultRequestConfigCustomizer the customizer to apply
* @return a new {@link HttpComponentsClientHttpRequestFactoryBuilder} instance
*/
public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigCustomizer(
Consumer<RequestConfig.Builder> defaultRequestConfigCustomizer) {
Assert.notNull(defaultRequestConfigCustomizer, "'defaultRequestConfigCustomizer' must not be null");
return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer,
this.connectionManagerCustomizer, this.socketConfigCustomizer, defaultRequestConfigCustomizer,
this.tlsSocketStrategyFactory);
}
according to the javadoc, the input request config builder customizer should apply addition customization
, but the implementation actually replaces the previous behavior.
Is there a reason to not have this.defaultRequestConfigCustomizer.andThen(defaultRequestConfigCustomizer)
instead?
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another