Collection doesn't allow optional simple java types.
----------------------------------------------------
Key: JIBX-76
URL: http://jira.codehaus.org/browse/JIBX-76
Project: JiBX
Type: Bug
Components: core
Versions: 1.0-RC0
Environment: Suse Linux 9.2, i686
Reporter: Kahro Raie
Priority: Minor
Attachments: example.tar.bz2
I need to create a collection of java Object where some are of simple Java
types like java.lang.String. I would really like to skip the wrapping patb for
it would make my job so much easier. Everything works fine until I mark the
value elemnt as optional:
<value name="string" style="element" type="java.lang.String"/>
->
<value name="string" style="element" type="java.lang.String" usage="optional"/>
But it must me marked optional for I want an unordered collection.
The problem is that JiBX binding process gives me an error:
[bind] Error running binding compiler
[bind] *** Error during code generation - please report this error on the
JiBX users list so that the condition can be caught during validation ***
[bind] java.lang.IllegalStateException: Internal error: No test for
implicit value from collection
[bind] at
org.jibx.binding.def.PropertyDefinition.genTest(PropertyDefinition.java:415)
[bind] at org.jibx.binding.def.ValueChild.genMarshal(ValueChild.java:527)
[bind] at
org.jibx.binding.def.ValueChild.genContentMarshal(ValueChild.java:687)
[bind] at
org.jibx.binding.def.NestedCollection.genContentMarshal(NestedCollection.java:255)
...
Anyways, I have prepared a simple example with three steps:
1. The working version that doesn't suite me for there the collection is not
unordered.
2. The example data file demonstrateing why the working case is not enought.
3. The example of a suitable binding file that gives the exception.
PS! The exception doesn't occur because of the unordered collection but because
of the optional value element.
--
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 the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs