Fixed the use of Lists with generics
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@655107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf5d268ceb
commit
5a96d1f218
|
@ -52,7 +52,7 @@ public class UrlEncodedFormEntity extends StringEntity {
|
||||||
* @throws UnsupportedEncodingException if the encoding isn't supported
|
* @throws UnsupportedEncodingException if the encoding isn't supported
|
||||||
*/
|
*/
|
||||||
public UrlEncodedFormEntity (
|
public UrlEncodedFormEntity (
|
||||||
final List <NameValuePair> parameters,
|
final List <? extends NameValuePair> parameters,
|
||||||
final String encoding) throws UnsupportedEncodingException {
|
final String encoding) throws UnsupportedEncodingException {
|
||||||
super(URLEncodedUtils.format(parameters, encoding),
|
super(URLEncodedUtils.format(parameters, encoding),
|
||||||
encoding);
|
encoding);
|
||||||
|
@ -67,7 +67,7 @@ public class UrlEncodedFormEntity extends StringEntity {
|
||||||
* @throws UnsupportedEncodingException if the default encoding isn't supported
|
* @throws UnsupportedEncodingException if the default encoding isn't supported
|
||||||
*/
|
*/
|
||||||
public UrlEncodedFormEntity (
|
public UrlEncodedFormEntity (
|
||||||
final List <NameValuePair> parameters) throws UnsupportedEncodingException {
|
final List <? extends NameValuePair> parameters) throws UnsupportedEncodingException {
|
||||||
super(URLEncodedUtils.format(parameters, HTTP.DEFAULT_CONTENT_CHARSET),
|
super(URLEncodedUtils.format(parameters, HTTP.DEFAULT_CONTENT_CHARSET),
|
||||||
HTTP.DEFAULT_CONTENT_CHARSET);
|
HTTP.DEFAULT_CONTENT_CHARSET);
|
||||||
setContentType(URLEncodedUtils.CONTENT_TYPE);
|
setContentType(URLEncodedUtils.CONTENT_TYPE);
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class URLEncodedUtils {
|
||||||
* @param encoding The encoding to use.
|
* @param encoding The encoding to use.
|
||||||
*/
|
*/
|
||||||
public static String format (
|
public static String format (
|
||||||
final List <NameValuePair> parameters,
|
final List <? extends NameValuePair> parameters,
|
||||||
final String encoding) {
|
final String encoding) {
|
||||||
final StringBuilder result = new StringBuilder();
|
final StringBuilder result = new StringBuilder();
|
||||||
for (final NameValuePair parameter : parameters) {
|
for (final NameValuePair parameter : parameters) {
|
||||||
|
|
Loading…
Reference in New Issue