Makefile.am: Removed java/io/Replaceable.java and java/io/Resolvable.java.
* Makefile.am: Removed java/io/Replaceable.java and java/io/Resolvable.java. * Makefile.in: Rebuilt. * gcj/javaprims.h: Removed Replaceable and Resolvable from java.io namespace. * java/io/ObjectInputStream.java (processResolution): Fixed typo in method name. (processResolution): Handle readResolve method via reflection with removal of Resolvable interface. * java/io/ObjectOutputStream.java (writeObject): Handle writeReplace method via reflection with removal of Replaceable interface. * java/io/Replaceable.java: Removed. * java/io/Resolvable.java: Removed. * java/security/Key.java (serialVersionUID): New field. * java/security/Provider.java (serialVersionUID): New field. * java/security/interfaces/DSAPrivateKey.java (serialVersionUID): New field. * java/security/interfaces/DSAPublicKey.java (serialVersionUID): New field. * java/sql/DataTruncation.java (serialVersionUID): New field. * java/sql/SQLException.java (serialVersionUID): New field. * java/sql/SQLWarning.java (serialVersionUID): New field. * java/util/Date.java (serialVersionUID): New field. (millis): Made transient. (readObject): New method. (writeObject): New method. Serialization mods. Note: The interfaces java.io.Replaceable and java.io.Resolvable were only temporary additions to JDK 1.2 beta versions and were not included in the JDK 1.2 final. The Serialization spec instructs how to deal with their methods (via reflection). From-SVN: r36736
This commit is contained in:
parent
cc0cbae17e
commit
bf3478059d
16 changed files with 194 additions and 204 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1998, 1999 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -18,13 +18,13 @@ import java.text.*;
|
|||
* "The Java Language Specification", ISBN 0-201-63451-1,
|
||||
* and O'Reilly's "Java in a Nutshell".
|
||||
* Status: Need to re-write toString().
|
||||
* Missing: ToGMTString and toLocaleString.
|
||||
* Serialization spec: Specifies readObject/writeObject.
|
||||
* Missing: ToGMTString.
|
||||
*/
|
||||
|
||||
public class Date implements java.io.Serializable, Cloneable
|
||||
{
|
||||
private long millis;
|
||||
private static final long serialVersionUID = 7523967970034938905L;
|
||||
|
||||
transient private long millis;
|
||||
|
||||
public Date() { millis = System.currentTimeMillis(); }
|
||||
|
||||
|
@ -480,4 +480,27 @@ public class Date implements java.io.Serializable, Cloneable
|
|||
cal.set(year+1900, month, date, hours, minutes, seconds);
|
||||
return cal.getTimeInMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads an Object from the stream.
|
||||
*/
|
||||
private void readObject (java.io.ObjectInputStream input)
|
||||
throws java.io.IOException, ClassNotFoundException
|
||||
{
|
||||
input.defaultReadObject ();
|
||||
millis = input.readLong ();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an Object to the stream.
|
||||
* @serialdata A long value representing the offset from the epoch
|
||||
* in milliseconds. This is the same value that is returned by the
|
||||
* method getTime().
|
||||
*/
|
||||
private void writeObject (java.io.ObjectOutputStream output)
|
||||
throws java.io.IOException
|
||||
{
|
||||
output.defaultWriteObject ();
|
||||
output.writeLong (millis);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue