[ http://jira.codehaus.org/browse/JIBX-66?page=comments#action_39635 ]
     
Brian Stansberry commented on JIBX-66:
--------------------------------------

This is really a continuation of JIRA-48.

Sorry - couldn't reopen that one and tried the Jira clone function, which 
created this report but won't let me edit the "Affects version" or description 
field.

This affects 1.0-RC0.

I find that I still get errors of the type reported in JIBX-48 if the item-type 
specified for the collection is itself a mapped class.  It works fine if 
collection elements are simple strings, but when I use a mapped type it fails 
with the following:

Exception in thread "main" java.lang.IllegalStateException: Internal error: 
Expected com.wrapsidy.jibx.CollectionElement on stack, found java.lang.Object
 full stack:
  0: com.wrapsidy.jibx.TestJiBXCollection
  1: com.wrapsidy.jibx.TestJiBXCollection
  2: java.lang.Object

        at 
org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:409)
        at 
org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:480)
        at 
org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:501)
        at 
org.jibx.binding.classes.MethodBuilder.appendCall(MethodBuilder.java:808)
        at 
org.jibx.binding.def.NestedCollection$AddStore.genStoreItem(NestedCollection.java:666)
        at 
org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:133)
        at 
org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:153)
        at 
org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:736)
        at 
org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:875)
        at 
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:272)
        at 
org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:541)
        at 
org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:600)
        at 
org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:578)

Will attach a zip with a test case.
        at org.jibx.binding.Loader.processBindings(Loader.java:257)
        at org.jibx.binding.Run.main(Run.java:185)

> item-type as the parameter type of the add-method in collection does not work 
> for complex types
> -----------------------------------------------------------------------------------------------
>
>          Key: JIBX-66
>          URL: http://jira.codehaus.org/browse/JIBX-66
>      Project: JiBX
>         Type: Improvement
>   Components: core
>     Versions: 1.0-beta3c
>     Reporter: Brian Stansberry
>     Assignee: Dennis Sosnoski
>      Fix For: 1.0-RC0
>  Attachments: collectionTest.zip
>
>
> The current implementation only allows java.lang.Object as the parameter type 
> for the method specified in the attribute add-method of the element 
> collection.
> Instead, it should use the class specified in the attribute item-type (if 
> this attribute is not specified it should use java.lang.Object).

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



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to