Affects Version/s: None
Fix Version/s: 1.2
JDK version and platform:IBM Classic VM (build 1.4.1, J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc))
I corrected one of the testcases, others may also have similar problems (as the IBM JVM doesn't return the member fields in the same order as specified in the code, causing compare failures when doing simple text compares).
Yes XMLUnit would seem to address the ordering issues I seen. If XMLUnit will be included, I could correct the ordering issues in the tests.
Yes, sun.miscUnsafe is available. I run some fairly complex objects through, and didn't see issues.
I'm happy to add XMLUnit to make the tests easier. This is something that has been discussed before, but at the time there was no overriding need. Looks like we have one now. If you can code up the code patch, I'll include XMLUnit when applying the patch.
I submitted the XMLUnit patch as http://jira.codehaus.org/browse/XSTR-216
Mauro, you closed this originally, but a lot of unit tests still fail on IBM JDK, because of the different element order. Did you apply the patch? IMHO it is wong anyway to fix the test cases since it means that XML files genereated by XStream might be incompatible when generated by JDKs from different vendors.
XStream will now detect JVMs reporting the declared fields in reverse order (like IBM JDK). The fields will be written now in declaration order.