commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Pemberton <niall.pember...@gmail.com>
Subject Re: svn commit: r911954 - /commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
Date Sat, 20 Feb 2010 20:57:13 GMT
On Sat, Feb 20, 2010 at 7:28 PM, sebb <sebbaz@gmail.com> wrote:
> On 19/02/2010, niallp@apache.org <niallp@apache.org> wrote:
>> Author: niallp
>>  Date: Fri Feb 19 19:54:13 2010
>>  New Revision: 911954
>>
>>  URL: http://svn.apache.org/viewvc?rev=911954&view=rev
>>  Log:
>>  LANG-76 Add a test case to try and reproduce
>
> I was able to reproduce the problem using a plain Java main() test.
>
> Don't have access to it currently, but I'm fairly sure I used a
> separate file for the Enum class - that might be why the test is not
> failing for you.

OK I've tried just running java from the command line with a main()
method and the enum in a separate class - but it still works OK for me
(using Sun's JDK 1.5.0_01 and 1.5.0_22 on Windows XP). If you
reproduce it again, could you document the scenario on the ticket.

Niall

>>  Modified:
>>     commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
>>
>>  Modified: commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
>>  URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java?rev=911954&r1=911953&r2=911954&view=diff
>>  ==============================================================================
>>  --- commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
(original)
>>  +++ commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
Fri Feb 19 19:54:13 2010
>>  @@ -157,4 +157,21 @@
>>          } catch (IllegalArgumentException ex) {}
>>      }
>>
>>  +    /** Test for LANG-76 **/
>>  +    public void testGetEnum_LANG76() {
>>  +        Object obj = EnumUtils.getEnum(Lang76Enum.class, "1");
>>  +        assertNotNull(obj);
>>  +        assertEquals("EnumUtilsTest.Lang76Enum[1]", obj.toString());
>>  +    }
>>  +
>>  +    /** Test Enum for LANG-76 **/
>>  +    public static final class Lang76Enum  extends Enum {
>>  +        public static final Lang76Enum ONE     = new Lang76Enum("1");
>>  +        public static final Lang76Enum TWO     = new Lang76Enum("2");
>>  +        public static final Lang76Enum THREE   = new Lang76Enum("3");
>>  +
>>  +        private Lang76Enum(String suit) {
>>  +            super(suit);
>>  +        }
>>  +    }
>>   }
>>

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


Mime
View raw message