hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meggermo <...@git.apache.org>
Subject [GitHub] httpclient pull request: String format fix
Date Sun, 20 Dec 2015 15:04:00 GMT
GitHub user meggermo opened a pull request:

    https://github.com/apache/httpclient/pull/38

    String format fix

    There are two issues in the toString method of OSGiProxyConfiguration
    - the number of provided arguments does not match the format string
    - the proxyExceptions argument is an array so it will not pretty-print.
    
    This pull request fixes both issues and demonstrates the fix with a JUnit test.
    
    Possible improvement for the JUnit test:
    Set access modifier to package for string constants in OSGiProxyConfiguration so I can
refer to them in the JUnit test. This would make the test less brittle to (internal) code
modifications.
    


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

    $ git pull https://github.com/meggermo/httpclient string-format-fix

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

    https://github.com/apache/httpclient/pull/38.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 #38
    
----
commit 5f0682d0319c433620bf749d473e54e8eaac5904
Author: Michiel Eggermont <michiel.eggermont@gmail.com>
Date:   2015-12-20T14:33:28Z

    Fix number or format arguments
    
    The format string requires 6 arguments while 7 are provided.
    From the format string it is clear that the first argument has
    been added by mistake.

commit ade748f3ac266ce1c0d9e65ea01a8b91e8aa03fd
Author: Michiel Eggermont <michiel.eggermont@gmail.com>
Date:   2015-12-20T14:42:14Z

    Convert array format argument to list
    
    The intent of the toString method is to produce a human-
     readable string. Using an array as a format argument is
     therefore probably not what was intended. Converting the
     array into a list will fix this problem.

commit 0c68a8521e7e743f2f89da18dba6cdbb5f36142f
Author: Michiel Eggermont <michiel.eggermont@gmail.com>
Date:   2015-12-20T14:43:22Z

    Add a unit test for toString

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message