Fixed a bug in object serialization/deserialization: Date properties are stored as

date objects, not Long objects.
This commit is contained in:
hns 2003-01-31 15:55:02 +00:00
parent 7f7d663c7d
commit 40f012d16d

View file

@ -45,9 +45,11 @@ public final class Property implements IProperty, Serializable, Cloneable {
value = in.readBoolean () ? Boolean.TRUE : Boolean.FALSE;
break;
case INTEGER:
case DATE:
value = new Long (in.readLong ());
break;
case DATE:
value = new Date (in.readLong ());
break;
case FLOAT:
value = new Double (in.readDouble ());
break;
@ -79,9 +81,11 @@ public final class Property implements IProperty, Serializable, Cloneable {
out.writeBoolean (((Boolean) value).booleanValue());
break;
case INTEGER:
case DATE:
out.writeLong (((Long) value).longValue());
break;
case DATE:
out.writeLong (((Date) value).getTime());
break;
case FLOAT:
out.writeDouble (((Double) value).doubleValue());
break;