highsource / jaxb2-basics

Useful plugins and tools for JAXB2.
BSD 2-Clause "Simplified" License
109 stars 54 forks source link

simplify:as-element-property not respecting jaxb:globalBindings collectionType="indexed" #115

Closed jcrokicki closed 1 year ago

jcrokicki commented 4 years ago

I have a xsd using xs:choice and need each element exposed as a collection.

It simplifies, but only as a List<>, not as an array as requested in the global bindings: I see that it realizes it should be simplified: [INFO] Parsing input schema(s)... [DEBUG] Element property [XAndY] has several types and will be simplified. [INFO] Compiling input schema(s)... The result is a class with List getX(), List getY() when it should be XType[] getX(), YType[] getY() because of the collectionType="indexed" in the globalBindings. Am I not doing it correctly with simplify? Other classes without xs:choice are generating arrays properly.
laurentschoelens commented 1 year ago

Hi @jcrokicki

This bug will be fixed in next jaxb-tools release (4.0.1)

Regards Laurent

jcrokicki commented 1 year ago

Thanks folks!

laurentschoelens commented 9 months ago

@jcrokicki Released v4.0.2 done Should be available soon in maven central