Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.3
-
Fix Version/s: 1.3.1
-
Component/s: None
-
Labels:None
-
JDK version and platform:Sun JDK 1.6
Description
=========== %< ============
final LocalDate ld0 = new LocalDate(2008, 07, 03);
final XStream xs = new XStream();
final String xml0 = xs.toXML(ld0);
final LocalDate ld1 = (LocalDate) xs.fromXML(xml0);
final String xml1 = xs.toXML(ld1);
final LocalDate ld2 = (LocalDate) xs.fromXML(xml1);
LocalDate ld1s = null;
LocalDate ld2s = null;
try
catch (Exception e)
{ // nothing } System.out.println(ld0.toString() + '\n' + xml0 + '\n'
+ ld1 + " (" + ld1s + ")\n" + xml1 + '\n'
+ ld2 + " (" + ld2s + ")\n");
=========== %< ============
For me it prints:
2008-07-03
<org.joda.time.LocalDate>
<iLocalMillis>1215043200000</iLocalMillis>
<iChronology class="org.joda.time.chrono.ISOChronology"
resolves-to="org.joda.time.chrono.ISOChronology$Stub" serialization="custom">
<org.joda.time.chrono.ISOChronology_-Stub>
<org.joda.time.tz.FixedDateTimeZone
resolves-to="org.joda.time.DateTimeZone$Stub"/>
</org.joda.time.chrono.ISOChronology_-Stub>
</iChronology>
</org.joda.time.LocalDate>
2008-07-02 (2008-07-03)
<org.joda.time.LocalDate>
<iLocalMillis>1215043200000</iLocalMillis>
<iChronology class="org.joda.time.chrono.ISOChronology"
resolves-to="org.joda.time.chrono.ISOChronology$Stub" serialization="custom">
<org.joda.time.chrono.ISOChronology_-Stub>
<org.joda.time.tz.CachedDateTimeZone
resolves-to="org.joda.time.DateTimeZone$Stub" serialization="custom">
<org.joda.time.DateTimeZone_-Stub>
<string>Europe/Berlin</string>
</org.joda.time.DateTimeZone_-Stub>
</org.joda.time.tz.CachedDateTimeZone>
</org.joda.time.chrono.ISOChronology_-Stub>
</iChronology>
</org.joda.time.LocalDate>
2008-07-02 (2008-07-03)
this is still an issue in version 1.5