unmarshalling collection into typed arraylist does not match arraylist type
---------------------------------------------------------------------------

                 Key: JIBX-182
                 URL: http://jira.codehaus.org/browse/JIBX-182
             Project: JiBX
          Issue Type: Bug
          Components: core
    Affects Versions: JiBX 1.1.5
         Environment: Windows 2k, Java 1.5.0_06, Oracle JDeveloper 10.1.3
            Reporter: Thomas Jones-Low
            Priority: Minor


If you have a collection unmarshalling into a typed ArrayList, and the binding 
file doesn't give the correct type, there is no error thrown either at bind 
compile time or at unmarshaling time. 

For example: 

class Template 
{
    enum days {MON, TUES, WED, THURS, FRI, SAT, SUN};
    ArrayList<days> activeDays;
}

and binding of

<mapping name="template" class="Template">
        <collection field="activeDays">
            <value name="activeDays" type="java.lang.String" usage="optional"/>
        </collection>
</mapping>

And an xml file of: 
<template>
<activeDays>MON</activeDays>
</template>

When this is unmarshalled, the activeDays array list has one element: A string 
"MON". rather than the enum element MON, as expected. 

-- 
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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to