
| Key: |
XSTR-375
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Assignee: |
Unassigned
|
| Reporter: |
Egor Samarkhanov
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
XStream
Created: 08/Jan/07 10:45 AM
Updated: 24/May/07 12:38 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.2.2
|
|
| JDK version and platform: |
1.4.2_09
|
|
I was unable to alias primitive types.
I tried the following:
XStream xs = new XStream( );
xs.alias( "bo", Boolean.TYPE );
Object o = new boolean[] {true, false};
String xml = xs.toXML( o );
that results in
<bo-array>
<bo>true</bo>
<bo>false</bo>
</bo-array>
but the call to xs.fromXML() for this XML throws
com.thoughtworks.xstream.mapper.CannotResolveClassException: boolean : boolean
|
|
Description
|
I was unable to alias primitive types.
I tried the following:
XStream xs = new XStream( );
xs.alias( "bo", Boolean.TYPE );
Object o = new boolean[] {true, false};
String xml = xs.toXML( o );
that results in
<bo-array>
<bo>true</bo>
<bo>false</bo>
</bo-array>
but the call to xs.fromXML() for this XML throws
com.thoughtworks.xstream.mapper.CannotResolveClassException: boolean : boolean
|
Show » |
|