hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Feiner (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCLIENT-1761) Missing null check in parse method
Date Wed, 10 Aug 2016 14:22:20 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Feiner updated HTTPCLIENT-1761:
--------------------------------------
    Affects Version/s: 4.4.1
                       4.5
                       4.5.1
                       4.5.2

> Missing null check in parse method
> ----------------------------------
>
>                 Key: HTTPCLIENT-1761
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1761
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>    Affects Versions: 4.4.1, 4.5, 4.5.1, 4.5.2
>            Reporter: Thomas Feiner
>
> While the method
> ```
> public static List<NameValuePair> parse(String s, Charset charset, char... separators)
> ```
> has a null check for String "s", this method has not
> ```
> public static List<NameValuePair> parse(String s, Charset charset)
> ```
> For consistency and backward compatibility reasons I recommend adding a null check there.
> Furthermore I would delegate to the method with separators:
> ```
> public static List<NameValuePair> parse(String s, Charset charset) {
>         return SafeURLEncodedUtils.parse(s, charset, '&', ';');
> } 
> ```



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

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


Mime
View raw message