twarner-sofi commented on code in PR #535:
URL:
https://github.com/apache/httpcomponents-client/pull/535#discussion_r1449152364
##########
httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java:
##########
@@ -63,7 +63,7 @@ public PlainConnectionSocketFactory() {
@Override
public Socket createSocket(final Proxy proxy, final HttpContext context)
throws IOException {
- return proxy != null ? new Socket(proxy) : new Socket();
Review Comment:
In the interface, yes, but that delegation is not reflected in
PlainConnectionSocketFactory's implementation of the method. This class is not
final and thus users can extend it, overriding createSocket. If that is
incorrect usage and this class was meant to be final, I think that should at
least be documented in the class's javadoc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]