Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1.3
-
Component/s: None
-
Labels:None
-
JDK version and platform:IBM JDK 1.3.1_02 for Windows
Description
When marshalling an untyped container (e.g., Object[]), both int[] and Integer[] are put inside <int-array> elements. When unmarshalling, XStream instantiates both types into int[].
XStream should probably delineate between int[] and Integer[] in the XML by using <integer-array> elements for the latter. The same thing applies to all primitives and their Object equivalents.
Test case attached.
Issue Links
- is duplicated by
-
XSTR-253 Float[] is demarshalled as float[]
Arrays of boxed types will have now have the real name as type part of an array. Since older XStream versions mapped those arrays always wrongly to arrays of primitive types, there's no change in backward compatibility.