[
https://issues.apache.org/jira/browse/HTTPCLIENT-2380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17993038#comment-17993038
]
ASF subversion and git services commented on HTTPCLIENT-2380:
-------------------------------------------------------------
Commit 6e0a18f2c2a6f976773b911869340b97545c632c in httpcomponents-client's
branch refs/heads/master from Arturo Bernal
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=6e0a18f2c ]
HTTPCLIENT-2380 – expose protected constructor in
DefaultAsyncClientConnectionOperator
> DefaultAsyncClientConnectionOperator has a package-private constructor
> ----------------------------------------------------------------------
>
> Key: HTTPCLIENT-2380
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2380
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.5
> Reporter: James Bradlee
> Priority: Minor
> Fix For: 5.5.1, 5.6-alpha1
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> [permalink
> github|https://github.com/apache/httpcomponents-client/blob/5c6c135a8b33eadd3b6867fe280c7fd9b69dc1d9/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultAsyncClientConnectionOperator.java#L65-L82]
> The DefaultAsyncClientConnectionOperator class has a package-private
> constructor, yet the class itself is defined as public, with protected
> methods I assume is meant to be overridden by external consumers? I suspect
> this is an accidental design issue - and the constructor was meant to be
> opened?
> Currently, it is not possible to instantiate this class outside of the
> org.apache.hc.client5.http.impl.nio package. Our current workaround is
> creating our own class in that package:
>
> {code:java}
> package org.apache.hc.client5.http.impl.nio
> import org.apache.hc.client5.http.DnsResolver
> import org.apache.hc.client5.http.SchemePortResolver
> import org.apache.hc.core5.http.config.Lookup
> import org.apache.hc.core5.http.nio.ssl.TlsStrategy
> open class ExtendableDefaultAsyncClientConnectionOperator(
> tlsStrategyLookup: Lookup<TlsStrategy>,
> schemePortResolver: SchemePortResolver?,
> dnsResolver: DnsResolver?,
> ) : DefaultAsyncClientConnectionOperator(
> tlsStrategyLookup,
> schemePortResolver,
> dnsResolver,
> ) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]