The fix for CASTOR-2141 works for us.  I went ahead and ran a build
based on the trunk.

Thank you,
Ron 

-----Original Message-----
From: Werner Guttmann (JIRA) [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 06, 2007 12:15 PM
To: Corcuera,Ron
Subject: [jira] Commented: (CASTOR-2141) Castor snapshot 1.1.3 source
generator enum default values not being set correctly.


    [
http://jira.codehaus.org/browse/CASTOR-2141?page=com.atlassian.jira.plug
in.system.issuetabpanels:comment-tabpanel#action_106651 ] 

Werner Guttmann commented on CASTOR-2141:
-----------------------------------------

Will make available a snapshot release as time permits.

> Castor snapshot 1.1.3 source generator enum default values not being
set correctly.
> ----------------------------------------------------------------------
> -------------
>
>                 Key: CASTOR-2141
>                 URL: http://jira.codehaus.org/browse/CASTOR-2141
>             Project: castor
>          Issue Type: Bug
>          Components: XML code generator
>    Affects Versions: 1.1.3
>         Environment: Windows using Intellij Idea.  Java 1.5.
>            Reporter: Ron Corcuera
>            Assignee: Matthias Epheser
>            Priority: Blocker
>             Fix For: 1.1.3
>
>         Attachments: MyUser.xsd, patch.c2141.20070906.txt
>
>
> I just tried out the snapshot release of Castor 1.1.3 and found what
seems to be a bug.  My schema has an element, screenSize, that is an
enumeration that consists of the values Small, Medium, and Large.  I set
the enumeration to have the default value of Medium.  screenSize is an
element in a complex type typeMyUser.  The source generator created the
classes TypeMyUser.java and ScreenSizeType.java.  TypeMyUser.java has a
member variable called _screenSize with a default value being set.  The
problem is the way the default value is being set.  It has something
like 
>       private ScreenSizeType _screenSize = 
> ScreenSizeType.valueOf("Medium"); The problem is the enum constant
name that it is passing into the valueOf method does not exist.  The
enum constants that were created were SMALL, MEDIUM, and LARGE (all
caps).  So, the line above should have passed the all caps enum constant
name instead:
>  
>       private ScreenSizeType _screenSize = 
> ScreenSizeType.valueOf("MEDIUM");

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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to