Hi, First of all, thanks for the new httpclient release. :-)
When I was updating my project I ran into one small generics issue; the following code will not compile:
new UrlEncodedFormEntity(Collections.singletonList(new BasicNameValuePair("a", "b")));
because UrlEncodedFormEntity wants a List<NameValuePair> and the above code results in a List<BasicNameValuePair>. Considering that the list is probably read only in the httpclient code, the declaration of the UrlEncodedFormEntity constructor could be changed to:
public UrlEncodedFormEntity (
final List <? extends NameValuePair> parameters,
final String encoding) throws UnsupportedEncodingException {
super(URLEncodedUtils.format(parameters, encoding),
encoding);
setContentType(URLEncodedUtils.CONTENT_TYPE);
}
(note the List<? extends NameValuePair>).
Regards,
Sebastiaan
smime.p7s
Description: S/MIME Cryptographic Signature
