erichonorez / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

Nested groups bound to non-collection type beans are unmarshalled as null #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
<group name="g1" class="my.Group1Class" maxOccurs="1">
    <record name="r1.1" class="map" maxOccurs="1">
        ... a list of fields...
    </record>

    <group name="g1.2" class="my.Group2Class" maxOccurs="1">
        <record name="r1.2.1" template="t121" maxOccurs="1" />

        <record name="r1.2.2" setter="addR122" class="my.Record122Class" template="t122" collection="list" />
    </group>
</group>

Group2Class field in Group1Class is null: setter method is never called

Horrible regression of 2.0.2 version: it still works in version 2.0.1

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

Original issue reported on code.google.com by giuseppe...@gmail.com on 9 Oct 2012 at 11:25

GoogleCodeExporter commented 9 years ago
problem is about

<stream name="mystream" format="fixedlength" mode="read">

Original comment by giuseppe...@gmail.com on 9 Oct 2012 at 2:36

GoogleCodeExporter commented 9 years ago
Please try the attached snapshot JAR.  This defect is specific to nested groups 
bound to a non-collection type bean.

BeanIO includes over 350 automated test cases, including test cases for nested 
groups bound to collections (and now for nested groups bound to 
non-collections).  Sorry for any inconvenience you incurred

Thanks,
Kevin

Original comment by kevin.s...@gmail.com on 11 Oct 2012 at 2:03

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kevin.s...@gmail.com on 11 Oct 2012 at 2:04

GoogleCodeExporter commented 9 years ago
The snapshot jar solves my problem, now I can run my my test suite
successfully.

I'll wait the availability of beanio 2.0.3 on maven repositories.

Thank you very much,
Giuseppe

Original comment by giuseppe...@gmail.com on 11 Oct 2012 at 9:46

GoogleCodeExporter commented 9 years ago
Fixed in release 2.0.3.

Original comment by kevin.s...@gmail.com on 22 Dec 2012 at 4:26