Affects Version/s: None
Fix Version/s: 1.4.5
JDK version and platform:1.4
Map Converter should not use the position of an element to determine if its a key or a value
The current implementation assumes that the key comes first and then the value:
where obj1 is assumed to be the key and obj2 the value.
Another thing about MapConverter is that it doesn't take into account the new "asAttribute" feature, and if one is working with ... let's say Strings and Integers and we have set
The attach is a solution for this
If the useAttributeFor is set then
the xml will be formatted:
<entry key="key" keyType="string" value="3" valueType="int"/>
<entry key="key2" keyType="string" value="4.0" valueType="double"/>
<entry value="4.0" valueType="double">
Note that now the order of key/value is not important because they are encapsulated into the <key>/<value> tags
- is related to
XSTR-405 Collections & Maps with named parts and no class attribute
the solution proposed has problems with the unmarshalling
can you provide your changes as diff and add a unit test? This will help us to track your changes even if we have made also some in the meantime and will also verify, that the functionality still does, what it should.
The diff, the source code with the bug fixed, and the testcase
download the .tar.gz and remove the other 2
Fernando, why did you resolve this issue? Nothing had been done with it yet. Do you cancel this request?
I thougth I have to set the state to resolved in order to test it. If you set the state to resolved once it has been tested and approved then the issue should be open.
No, we just look as long it is open
Resolved is set by one of the devs, if the functionality is applied and can be tested or is rejected for a valid reason. But it may take some time ...
New NamedMapConverter supports most features. The attribute support is explicit though. Available in trunk.
The other version has a bug