You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Niall Pemberton <ni...@gmail.com> on 2009/07/23 01:47:28 UTC

Re: svn commit: r796172 [1/3] - in /commons/proper/codec/trunk: ./ src/java/org/apache/commons/codec/ src/java/org/apache/commons/codec/binary/ src/java/org/apache/commons/codec/net/ src/test/org/apache/commons/codec/ src/test/org/apache/commons/code

The RequiredCharsetNamesTest you added has a header with "Copyright
(C) 1993-2003 SEAGULL" rather than the standard Apache License header.

Niall

On Tue, Jul 21, 2009 at 9:00 AM, <gg...@apache.org> wrote:
> Author: ggregory
> Date: Tue Jul 21 08:00:52 2009
> New Revision: 796172
>
> URL: http://svn.apache.org/viewvc?rev=796172&view=rev
> Log:
> Moved package private class CharsetEncodingNames to the main package under the name RequiredCharsetNames. "Charset" reflects the name used in the JRE instead of "encoding". Updated string literals for required charset names ("UTF-8", "US-ASCII", etc) with references to new class static constants. Also created the new class StringBytesUtils (need a better name?) to wrap calls to String#getBytes(String) and String#String(byte[],String) for required charset names, such that it is not required for call sites to catch or re-throw UnsupportedEncodingException since Java requires 6 charsets to be present.
>
> Added:
>    commons/proper/codec/trunk/src/java/org/apache/commons/codec/RequiredCharsetNames.java
>      - copied, changed from r795566, commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/CharacterEncodingNames.java
>    commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/StringBytesUtils.java
>    commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java
>    commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/StringBytesUtilsTest.java


<snip>
> Added: 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/RequiredCharsetNamesTest.java?rev=796172&view=auto
> ==============================================================================
> --- commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java (added)
> +++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/RequiredCharsetNamesTest.java Tue Jul 21 08:00:52 2009
> @@ -0,0 +1,46 @@
> +/*
> + * Copyright (C) 1993-2003 SEAGULL
> + *
> + * RequiredCharsetNamesTest.java
> + * Created on Jul 20, 2009, 6:08:58 PM
> + *
> + */
> +
> +package org.apache.commons.codec;
> +
> +import junit.framework.Assert;
> +import junit.framework.TestCase;
> +
> +/**
> + * Sanity checks.
> + *
> + * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
> + * @version $Id: $
> + */
> +public class RequiredCharsetNamesTest extends TestCase {
> +
> +    public void testIso8859_1() {
> +        Assert.assertEquals("ISO-8859-1", RequiredCharsetNames.ISO_8859_1);
> +    }
> +
> +    public void testUsAscii() {
> +        Assert.assertEquals("US-ASCII", RequiredCharsetNames.US_ASCII);
> +    }
> +
> +    public void testUtf16() {
> +        Assert.assertEquals("UTF-16", RequiredCharsetNames.UTF_16);
> +    }
> +
> +    public void testUtf16Be() {
> +        Assert.assertEquals("UTF-16BE", RequiredCharsetNames.UTF_16BE);
> +    }
> +
> +    public void testUtf16Le() {
> +        Assert.assertEquals("UTF-16LE", RequiredCharsetNames.UTF_16LE);
> +    }
> +
> +    public void testUtf8() {
> +        Assert.assertEquals("UTF-8", RequiredCharsetNames.UTF_8);
> +    }
> +
> +}
</snip>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org