You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/22 01:20:39 UTC

[jira] [Commented] (WAGON-449) CLIENT not changed after setting PoolingHttpClientConnectionManager

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

ASF GitHub Bot commented on WAGON-449:
--------------------------------------

GitHub user hyPiRion opened a pull request:

    https://github.com/apache/maven-wagon/pull/21

    [WAGON-449] Recreate http-wagon client when connection manager is changed

    Hi there,
    
    This is a fix for the bug report [WAGON-449](https://issues.apache.org/jira/browse/WAGON-449). It changes the CLIENT field to a nonfinal field so that it can be updated, and then recreates it whenever `setPoolingHttpClientConnectionManager` is set. This means that the new client will actually be generated from the newly set connection manager.
    
    As this this includes setting CLIENT to a nonfinal field, its name is changed to httpClient to satisfy naming conventions.
    
    I have tried to make this pull request as close to what seems to be the convention this project uses, but I may have missed things as I am not mainly a Java programmer nor uses Maven extensively. Please feel free to mention anything that I may have missed or would make it easier for you folks to apply this patch.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hyPiRion/maven-wagon WAGON-449

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-wagon/pull/21.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21
    
----
commit 4f42503a9aa6d6c03bfdf2562cb86eec194b70dd
Author: Jean Niklas L'orange <je...@hypirion.com>
Date:   2016-01-21T23:48:17Z

    [WAGON-449] Use new connection manager when set
    
    Recreate the http-wagon CLIENT after calling
    setPoolingHttpClientConnectionManager.
    
    This also includes setting CLIENT to a nonfinal field, and as a result
    its name is changed to httpClient to satisfy naming conventions.

----


> CLIENT not changed after setting PoolingHttpClientConnectionManager
> -------------------------------------------------------------------
>
>                 Key: WAGON-449
>                 URL: https://issues.apache.org/jira/browse/WAGON-449
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-http
>    Affects Versions: 2.8, 2.9, 2.10
>            Reporter: Jean Niklas L'orange
>
> The AbstractHttpClientWagon class statically creates both a PoolingHttpClientConnectionManager and a client that uses said connection manager. This is fine, had it not been the case that the client itself is a final field and is never updated.
> Thus, using {{setPoolingHttpClientConnectionManager}} has no effect as the client is based on the PoolingHttpClientConnectionManager created at startup. This affects users that e.g. may want to change the SSLContext to support self-signed certificates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)