sonatype/nexus-oss — pull request #400 by cstamas (2014-03-11 12:21:37+00:00)
Title: Fix the unintentional CredProvider replace.

As Benjamin spotted, the HttpClientBuilder#setDefaultCredentialsProvider
method silently replaced any previously set provider.

This also happened in case when remote but also proxy needed
credentials. In worst case, the provider would be replaced 3
times (remote authc + HTTP + HTTPS proxy).

Added Javadoc warning about this, and also added
a new Builder method that delegates to it's own instance
of CredentialsProvider that if used, will replace the
HttpClientBuilder.

Added UT verifying the change.