You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2008/05/10 17:20:42 UTC
svn commit: r655107 - in
/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client:
entity/UrlEncodedFormEntity.java utils/URLEncodedUtils.java
Author: olegk
Date: Sat May 10 08:20:42 2008
New Revision: 655107
URL: http://svn.apache.org/viewvc?rev=655107&view=rev
Log:
Fixed the use of Lists with generics
Modified:
httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java?rev=655107&r1=655106&r2=655107&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java Sat May 10 08:20:42 2008
@@ -52,7 +52,7 @@
* @throws UnsupportedEncodingException if the encoding isn't supported
*/
public UrlEncodedFormEntity (
- final List <NameValuePair> parameters,
+ final List <? extends NameValuePair> parameters,
final String encoding) throws UnsupportedEncodingException {
super(URLEncodedUtils.format(parameters, encoding),
encoding);
@@ -67,7 +67,7 @@
* @throws UnsupportedEncodingException if the default encoding isn't supported
*/
public UrlEncodedFormEntity (
- final List <NameValuePair> parameters) throws UnsupportedEncodingException {
+ final List <? extends NameValuePair> parameters) throws UnsupportedEncodingException {
super(URLEncodedUtils.format(parameters, HTTP.DEFAULT_CONTENT_CHARSET),
HTTP.DEFAULT_CONTENT_CHARSET);
setContentType(URLEncodedUtils.CONTENT_TYPE);
Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java?rev=655107&r1=655106&r2=655107&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java Sat May 10 08:20:42 2008
@@ -154,7 +154,7 @@
* @param encoding The encoding to use.
*/
public static String format (
- final List <NameValuePair> parameters,
+ final List <? extends NameValuePair> parameters,
final String encoding) {
final StringBuilder result = new StringBuilder();
for (final NameValuePair parameter : parameters) {