You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2017/10/24 17:53:49 UTC

svn commit: r1813200 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java

Author: ggregory
Date: Tue Oct 24 17:53:49 2017
New Revision: 1813200

URL: http://svn.apache.org/viewvc?rev=1813200&view=rev
Log:
Do not hide other name.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java?rev=1813200&r1=1813199&r2=1813200&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/URLCodec.java Tue Oct 24 17:53:49 2017
@@ -220,17 +220,17 @@ public class URLCodec implements BinaryE
      *
      * @param str
      *            string to convert to a URL safe form
-     * @param charset
+     * @param charsetName
      *            the charset for str
      * @return URL safe string
      * @throws UnsupportedEncodingException
      *             Thrown if charset is not supported
      */
-    public String encode(final String str, final String charset) throws UnsupportedEncodingException {
+    public String encode(final String str, final String charsetName) throws UnsupportedEncodingException {
         if (str == null) {
             return null;
         }
-        return StringUtils.newStringUsAscii(encode(str.getBytes(charset)));
+        return StringUtils.newStringUsAscii(encode(str.getBytes(charsetName)));
     }
 
     /**
@@ -263,7 +263,7 @@ public class URLCodec implements BinaryE
      *
      * @param str
      *            URL safe string to convert into its original form
-     * @param charset
+     * @param charsetName
      *            the original string charset
      * @return original string
      * @throws DecoderException
@@ -271,11 +271,11 @@ public class URLCodec implements BinaryE
      * @throws UnsupportedEncodingException
      *             Thrown if charset is not supported
      */
-    public String decode(final String str, final String charset) throws DecoderException, UnsupportedEncodingException {
+    public String decode(final String str, final String charsetName) throws DecoderException, UnsupportedEncodingException {
         if (str == null) {
             return null;
         }
-        return new String(decode(StringUtils.getBytesUsAscii(str)), charset);
+        return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);
     }
 
     /**