You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/06/08 10:43:38 UTC

[jira] Updated: (LANG-153) [lang] Can't XMLDecode an Enum

     [ http://issues.apache.org/jira/browse/LANG-153?page=all ]

Henri Yandell updated LANG-153:
-------------------------------

    Fix Version: 2.3
                     (was: 2.2)

In an effort to get 2.2 out sooner rather than later, I'm assiging all the Enum issues to 2.3. There's been no work on them currently and might be best to focus on them in a 2.3 release instead of trying to squeeze them into the 2.2 release.

Hopefully this will keep the 2.3 release scope pretty tight.

> [lang] Can't XMLDecode an Enum
> ------------------------------
>
>          Key: LANG-153
>          URL: http://issues.apache.org/jira/browse/LANG-153
>      Project: Commons Lang
>         Type: Bug

>     Versions: 2.0
>  Environment: Operating System: Windows 2000
> Platform: PC
>     Reporter: Kevin Gilpin
>      Fix For: 2.3
>  Attachments: CommonsLangBug33965Test.java
>
> I am encoding and decoding Enums using java.beans.XMLEncoder/Decoder.
> When an Enum is decoded, I am using the following to get the instance. The
> enumClass name and the enum name are stored in the serialized XML file, then
> used to restore the bean at read time
>         return EnumUtils.getEnum(enumClass, name);
> The problem is that the Enum.cEnumClasses map may not contain an entry for the
> Enum class yet, despite the fact that the Class for the enum has been loaded.
> If I loop through the Class.fields using reflection and get(null) the value for
> each one, then the cEnumClasses is populated and getEnum works.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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