[ 
http://jira.codehaus.org/browse/JIBX-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski resolved JIBX-182.
----------------------------------

      Assignee: Dennis Sosnoski
    Resolution: Won't Fix

I can't really see this as a bug. Generic types are just a source code 
convenience to eliminate explicit casts (the casts are still there, they're 
just generated automatically by the compiler) and create the appearance of 
typed collections without the reality.

With JiBX 2.0 source code generation this type of situation will show up as a 
compile-time error. Until then I don't see it as worth the effort to try to 
enforce generic types.

> 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
>            Assignee: Dennis Sosnoski
>            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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to