[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600905#comment-17600905
 ] 

Johannes Graham commented on HTTPCLIENT-2234:
---------------------------------------------

The value is really about removing unnecessary transitive dependencies. In the 
case of a library that is frequently depended on transitively like http-client, 
it is attractive to avoid unnecessary dependencies. The issue is to some degree 
one of aesthetics, but the extra code bloat becomes more relevant in the case 
of lambdas, where startup time and memory consumption cost money. There are 
also issues of conflicting dependency versions, as well as security concerns 
around the presence of extra code in the classpath (ref log4shell)

I was going to manually migrate the files to reduce the amount of extras pulled 
in. Shading is also an option.

An alternative is to choose the implementation at runtime - use one of 
java.util.Base64 or  javax.xml.bind.DatatypeConverter depending on what is 
available.

In any case, I opened the issue to see if there was any shared interest in 
this. If there is not, then this issue can be closed.






> remove dependency on commons-codec in older versions of http-client
> -------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2234
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2234
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient (classic)
>    Affects Versions: 5.1.3
>            Reporter: Johannes Graham
>            Priority: Minor
>
> This would effectively be a backport of HTTPCLIENT-2218.
> The commons-codec jar file is about 345k, but only a small fraction of it is 
> relevant to http-client.
> If there is any interest in pursuing this, I would be willing to provide a PR 
> for it.
> My initial proposal for implementing this would be to pull the relevant code 
> from commons-codec and include a simplified version of it in this project.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to