Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
4.4.1, 4.5, 4.5.1, 4.5.2
-
None
-
None
-
Patch
Description
While in org.apache.http.client.utils.URLEncodedUtils the method
public static List<NameValuePair> parse(String s, Charset charset, char... separators)
has a null check for String "s", this method has no null check:
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 URLEncodedUtils.parse(s, charset, '&', ';'); }
Attachments
Attachments
Issue Links
- duplicates
-
HTTPCLIENT-1746 URLEncodedUtils.parse(String, CharSet) in 4.4 causes an NPE on null input and is not backward compatible
- Resolved