commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r797857 - in /commons/proper/codec/trunk/src: java/org/apache/commons/codec/ java/org/apache/commons/codec/binary/ java/org/apache/commons/codec/net/ test/org/apache/commons/codec/ test/org/apache/commons/codec/net/
Date Sat, 25 Jul 2009 23:43:33 GMT
Author: ggregory
Date: Sat Jul 25 23:43:33 2009
New Revision: 797857

URL: http://svn.apache.org/viewvc?rev=797857&view=rev
Log:
Renamed RequiredCharsetNames to CharEncoding to match [lang]. Constant name and values are
the same.

Added:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/CharEncoding.java
      - copied, changed from r797854, commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/CharEncodingTest.java
      - copied, changed from r797854, commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java
Removed:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java
Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/BCodec.java
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QCodec.java
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/BCodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java

Copied: commons/proper/codec/trunk/src/java/org/apache/commons/codec/CharEncoding.java (from
r797854, commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java)
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/CharEncoding.java?p2=commons/proper/codec/trunk/src/java/org/apache/commons/codec/CharEncoding.java&p1=commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java&r1=797854&r2=797857&rev=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/CharEncoding.java Sat Jul
25 23:43:33 2009
@@ -20,8 +20,8 @@
 /**
  * Character encoding names required of every implementation of the Java platform.
  * 
- * From the Java documentation <a
- * href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>:
+ * From the Java documentation <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard
+ * charsets</a>:
  * <p>
  * <cite>Every implementation of the Java platform is required to support the following
character encodings. Consult the
  * release documentation for your implementation to see if any other encodings are supported.
Consult the release
@@ -52,11 +52,9 @@
  * @since 1.4
  * @version $Id$
  */
-public class RequiredCharsetNames {
+public class CharEncoding {
     /**
-     * <p>
-     * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.
-     * </p>
+     * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1. </p>
      * <p>
      * Every implementation of the Java platform is required to support this character encoding.
      * </p>

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java
Sat Jul 25 23:43:33 2009
@@ -19,13 +19,13 @@
 
 import java.io.UnsupportedEncodingException;
 
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * Converts String to bytes using the encodings required by the Java specification. These
encodings are specified in <a
  * href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * 
- * @see RequiredCharsetNames
+ * @see CharEncoding
  * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard
charsets</a>
  * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
  * @version $Id: $
@@ -46,7 +46,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesIso8859_1(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.ISO_8859_1);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.ISO_8859_1);
     }
 
     /**
@@ -62,7 +62,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesUsAscii(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.US_ASCII);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.US_ASCII);
     }
 
     /**
@@ -78,7 +78,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesUtf16(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.UTF_16);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.UTF_16);
     }
 
     /**
@@ -94,7 +94,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesUtf16Be(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.UTF_16BE);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.UTF_16BE);
     }
 
     /**
@@ -110,7 +110,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesUtf16Le(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.UTF_16LE);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.UTF_16LE);
     }
 
     /**
@@ -126,7 +126,7 @@
      * @see #getSupportedBytes(String, String)
      */
     public static byte[] getBytesUtf8(String string) {
-        return StringBytesUtils.getSupportedBytes(string, RequiredCharsetNames.UTF_8);
+        return StringBytesUtils.getSupportedBytes(string, CharEncoding.UTF_8);
     }
 
     /**
@@ -145,7 +145,7 @@
      * @throws IllegalStateException
      *             Thrown when a {@link UnsupportedEncodingException} is caught, which should
never happen for a
      *             required charset name.
-     * @see RequiredCharsetNames
+     * @see CharEncoding
      * @see String#getBytes(String)
      */
     public static byte[] getSupportedBytes(String string, String charsetName) {
@@ -174,7 +174,7 @@
      * @throws IllegalStateException
      *             Thrown when a {@link UnsupportedEncodingException} is caught, which should
never happen for a
      *             required charset name.
-     * @see RequiredCharsetNames
+     * @see CharEncoding
      * @see String#String(byte[], String)
      */
     public static String newString(byte[] bytes, String charsetName) {
@@ -195,7 +195,7 @@
      *             charset is required.
      */
     public static String newStringIso8859_1(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.ISO_8859_1);
+        return StringBytesUtils.newString(bytes, CharEncoding.ISO_8859_1);
     }
 
     /**
@@ -208,7 +208,7 @@
      *             charset is required.
      */
     public static String newStringUsAscii(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.US_ASCII);
+        return StringBytesUtils.newString(bytes, CharEncoding.US_ASCII);
     }
 
     /**
@@ -221,7 +221,7 @@
      *             charset is required.
      */
     public static String newStringUtf16(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.UTF_16);
+        return StringBytesUtils.newString(bytes, CharEncoding.UTF_16);
     }
 
     /**
@@ -234,7 +234,7 @@
      *             charset is required.
      */
     public static String newStringUtf16Be(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.UTF_16BE);
+        return StringBytesUtils.newString(bytes, CharEncoding.UTF_16BE);
     }
 
     /**
@@ -247,7 +247,7 @@
      *             charset is required.
      */
     public static String newStringUtf16Le(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.UTF_16LE);
+        return StringBytesUtils.newString(bytes, CharEncoding.UTF_16LE);
     }
 
     /**
@@ -260,7 +260,7 @@
      *             charset is required.
      */
     public static String newStringUtf8(byte[] bytes) {
-        return StringBytesUtils.newString(bytes, RequiredCharsetNames.UTF_8);
+        return StringBytesUtils.newString(bytes, CharEncoding.UTF_8);
     }
 
     private StringBytesUtils() {

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/BCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/BCodec.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/BCodec.java (original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/BCodec.java Sat Jul 25
23:43:33 2009
@@ -21,7 +21,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.StringDecoder;
 import org.apache.commons.codec.StringEncoder;
 import org.apache.commons.codec.binary.Base64;
@@ -55,7 +55,7 @@
      * Default constructor.
      */
     public BCodec() {
-        this(RequiredCharsetNames.UTF_8);
+        this(CharEncoding.UTF_8);
     }
 
     /**

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QCodec.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QCodec.java (original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QCodec.java Sat Jul 25
23:43:33 2009
@@ -22,7 +22,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.StringDecoder;
 import org.apache.commons.codec.StringEncoder;
 
@@ -110,7 +110,7 @@
      * Default constructor.
      */
     public QCodec() {
-        this(RequiredCharsetNames.UTF_8);
+        this(CharEncoding.UTF_8);
     }
 
     /**

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
Sat Jul 25 23:43:33 2009
@@ -25,7 +25,7 @@
 import org.apache.commons.codec.BinaryEncoder;
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.StringDecoder;
 import org.apache.commons.codec.StringEncoder;
 import org.apache.commons.codec.binary.StringBytesUtils;
@@ -93,7 +93,7 @@
      * Default constructor.
      */
     public QuotedPrintableCodec() {
-        this(RequiredCharsetNames.UTF_8);
+        this(CharEncoding.UTF_8);
     }
 
     /**

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java (original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java Sat Jul
25 23:43:33 2009
@@ -25,7 +25,7 @@
 import org.apache.commons.codec.BinaryEncoder;
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 import org.apache.commons.codec.StringDecoder;
 import org.apache.commons.codec.StringEncoder;
 import org.apache.commons.codec.binary.StringBytesUtils;
@@ -99,7 +99,7 @@
      * Default constructor.
      */
     public URLCodec() {
-        this(RequiredCharsetNames.UTF_8);
+        this(CharEncoding.UTF_8);
     }
 
     /**

Copied: commons/proper/codec/trunk/src/test/org/apache/commons/codec/CharEncodingTest.java
(from r797854, commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/CharEncodingTest.java?p2=commons/proper/codec/trunk/src/test/org/apache/commons/codec/CharEncodingTest.java&p1=commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java&r1=797854&r2=797857&rev=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/CharEncodingTest.java Sat
Jul 25 23:43:33 2009
@@ -26,37 +26,37 @@
  * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
  * @version $Id: $
  */
-public class RequiredCharsetNamesTest extends TestCase {
+public class CharEncodingTest extends TestCase {
 
     /**
      * We could make the constructor private in the future, it's a matter a style.
      */
     public void testConstructor() {
-        new RequiredCharsetNames();
+        new CharEncoding();
     }
 
     public void testIso8859_1() {
-        Assert.assertEquals("ISO-8859-1", RequiredCharsetNames.ISO_8859_1);
+        Assert.assertEquals("ISO-8859-1", CharEncoding.ISO_8859_1);
     }
 
     public void testUsAscii() {
-        Assert.assertEquals("US-ASCII", RequiredCharsetNames.US_ASCII);
+        Assert.assertEquals("US-ASCII", CharEncoding.US_ASCII);
     }
 
     public void testUtf16() {
-        Assert.assertEquals("UTF-16", RequiredCharsetNames.UTF_16);
+        Assert.assertEquals("UTF-16", CharEncoding.UTF_16);
     }
 
     public void testUtf16Be() {
-        Assert.assertEquals("UTF-16BE", RequiredCharsetNames.UTF_16BE);
+        Assert.assertEquals("UTF-16BE", CharEncoding.UTF_16BE);
     }
 
     public void testUtf16Le() {
-        Assert.assertEquals("UTF-16LE", RequiredCharsetNames.UTF_16LE);
+        Assert.assertEquals("UTF-16LE", CharEncoding.UTF_16LE);
     }
 
     public void testUtf8() {
-        Assert.assertEquals("UTF-8", RequiredCharsetNames.UTF_8);
+        Assert.assertEquals("UTF-8", CharEncoding.UTF_8);
     }
 
 }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/BCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/BCodecTest.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/BCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/BCodecTest.java Sat Jul
25 23:43:33 2009
@@ -21,7 +21,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * Quoted-printable codec test cases
@@ -62,7 +62,7 @@
         String ru_msg = constructString(RUSSIAN_STUFF_UNICODE);
         String ch_msg = constructString(SWISS_GERMAN_STUFF_UNICODE);
 
-        BCodec bcodec = new BCodec(RequiredCharsetNames.UTF_8);
+        BCodec bcodec = new BCodec(CharEncoding.UTF_8);
 
         assertEquals("=?UTF-8?B?0JLRgdC10Lxf0L/RgNC40LLQtdGC?=", bcodec.encode(ru_msg));
         assertEquals("=?UTF-8?B?R3LDvGV6aV96w6Rtw6Q=?=", bcodec.encode(ch_msg));

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java Sat Jul
25 23:43:33 2009
@@ -22,7 +22,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * Quoted-printable codec test cases
@@ -66,7 +66,7 @@
         String ru_msg = constructString(RUSSIAN_STUFF_UNICODE); 
         String ch_msg = constructString(SWISS_GERMAN_STUFF_UNICODE); 
         
-        QCodec qcodec = new QCodec(RequiredCharsetNames.UTF_8);
+        QCodec qcodec = new QCodec(CharEncoding.UTF_8);
         
         assertEquals(
             "=?UTF-8?Q?=D0=92=D1=81=D0=B5=D0=BC=5F=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D1=82?=",


Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
Sat Jul 25 23:43:33 2009
@@ -21,7 +21,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * Quoted-printable codec test cases
@@ -63,12 +63,12 @@
         
         assertEquals(
             "=D0=92=D1=81=D0=B5=D0=BC_=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D1=82", 
-        qpcodec.encode(ru_msg, RequiredCharsetNames.UTF_8)
+        qpcodec.encode(ru_msg, CharEncoding.UTF_8)
         );
-        assertEquals("Gr=C3=BCezi_z=C3=A4m=C3=A4", qpcodec.encode(ch_msg, RequiredCharsetNames.UTF_8));
+        assertEquals("Gr=C3=BCezi_z=C3=A4m=C3=A4", qpcodec.encode(ch_msg, CharEncoding.UTF_8));
         
-        assertEquals(ru_msg, qpcodec.decode(qpcodec.encode(ru_msg, RequiredCharsetNames.UTF_8),
RequiredCharsetNames.UTF_8));
-        assertEquals(ch_msg, qpcodec.decode(qpcodec.encode(ch_msg, RequiredCharsetNames.UTF_8),
RequiredCharsetNames.UTF_8));
+        assertEquals(ru_msg, qpcodec.decode(qpcodec.encode(ru_msg, CharEncoding.UTF_8), CharEncoding.UTF_8));
+        assertEquals(ch_msg, qpcodec.decode(qpcodec.encode(ch_msg, CharEncoding.UTF_8), CharEncoding.UTF_8));
     }
 
     public void testBasicEncodeDecode() throws Exception {

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
Sat Jul 25 23:43:33 2009
@@ -20,7 +20,7 @@
 import junit.framework.TestCase;
 
 import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * RFC 1522 compliant codec test cases
@@ -53,7 +53,7 @@
     public void testNullInput() throws Exception {
         RFC1522TestCodec testcodec = new RFC1522TestCodec();
         assertNull(testcodec.decodeText(null));
-        assertNull(testcodec.encodeText(null, RequiredCharsetNames.UTF_8));
+        assertNull(testcodec.encodeText(null, CharEncoding.UTF_8));
     }
 
     public void testDecodeInvalid() throws Exception {

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java?rev=797857&r1=797856&r2=797857&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java Sat
Jul 25 23:43:33 2009
@@ -23,7 +23,7 @@
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.RequiredCharsetNames;
+import org.apache.commons.codec.CharEncoding;
 
 /**
  * URL codec test cases
@@ -70,12 +70,12 @@
         
         assertEquals(
             "%D0%92%D1%81%D0%B5%D0%BC_%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82", 
-            urlCodec.encode(ru_msg, RequiredCharsetNames.UTF_8)
+            urlCodec.encode(ru_msg, CharEncoding.UTF_8)
         );
-        assertEquals("Gr%C3%BCezi_z%C3%A4m%C3%A4", urlCodec.encode(ch_msg, RequiredCharsetNames.UTF_8));
+        assertEquals("Gr%C3%BCezi_z%C3%A4m%C3%A4", urlCodec.encode(ch_msg, CharEncoding.UTF_8));
         
-        assertEquals(ru_msg, urlCodec.decode(urlCodec.encode(ru_msg, RequiredCharsetNames.UTF_8),
RequiredCharsetNames.UTF_8));
-        assertEquals(ch_msg, urlCodec.decode(urlCodec.encode(ch_msg, RequiredCharsetNames.UTF_8),
RequiredCharsetNames.UTF_8));
+        assertEquals(ru_msg, urlCodec.decode(urlCodec.encode(ru_msg, CharEncoding.UTF_8),
CharEncoding.UTF_8));
+        assertEquals(ch_msg, urlCodec.decode(urlCodec.encode(ch_msg, CharEncoding.UTF_8),
CharEncoding.UTF_8));
         this.validateState(urlCodec);
     }
 



Mime
View raw message