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 2015/07/04 15:53:37 UTC
svn commit: r1689159 -
/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
Author: olegk
Date: Sat Jul 4 13:53:36 2015
New Revision: 1689159
URL: http://svn.apache.org/r1689159
Log:
HTTPCLIENT-1468: Remove unneccessary throws UnsupportedEncodingException
Contributed by Robin Skoglund <robinsk at gmail.com>
Modified:
httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java?rev=1689159&r1=1689158&r2=1689159&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java Sat Jul 4 13:53:36 2015
@@ -26,7 +26,6 @@
*/
package org.apache.http.client.entity;
-import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.List;
@@ -50,22 +49,6 @@ public class UrlEncodedFormEntity extend
* Constructs a new {@link UrlEncodedFormEntity} with the list
* of parameters in the specified encoding.
*
- * @param parameters list of name/value pairs
- * @param charset encoding the name/value pairs be encoded with
- * @throws UnsupportedEncodingException if the encoding isn't supported
- */
- public UrlEncodedFormEntity (
- final List <? extends NameValuePair> parameters,
- final String charset) throws UnsupportedEncodingException {
- super(URLEncodedUtils.format(parameters,
- charset != null ? charset : HTTP.DEF_CONTENT_CHARSET.name()),
- ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset));
- }
-
- /**
- * Constructs a new {@link UrlEncodedFormEntity} with the list
- * of parameters in the specified encoding.
- *
* @param parameters iterable collection of name/value pairs
* @param charset encoding the name/value pairs be encoded with
*
@@ -84,11 +67,9 @@ public class UrlEncodedFormEntity extend
* of parameters with the default encoding of {@link HTTP#DEFAULT_CONTENT_CHARSET}
*
* @param parameters list of name/value pairs
- * @throws UnsupportedEncodingException if the default encoding isn't supported
*/
- public UrlEncodedFormEntity (
- final List <? extends NameValuePair> parameters) throws UnsupportedEncodingException {
- this(parameters, (Charset) null);
+ public UrlEncodedFormEntity (final List <? extends NameValuePair> parameters){
+ this(parameters, null);
}
/**