diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-06 15:52:00 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-06 15:52:00 +0000 |
commit | 319330c8154baef9ba8742fa56173a4cf9a78eae (patch) | |
tree | 3428d2857f98daedbe65eb503939fd740fdec28a /libjava/java/util | |
parent | f9a81c6e7ac3129c7de0fe81f5f7743e5b77ef70 (diff) | |
download | gcc-319330c8154baef9ba8742fa56173a4cf9a78eae.tar.gz |
2004-11-06 Mattias Rehnberg <Mattias.Rehnberg@home.se>
* java/io/Vector.java
(writeObject): New function to serialized output thread safe.
* java/io/ObjectOutputStream.java
(writeObject): Move the assignment of the class handle to after
the assignment of class descriptor handle.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/Vector.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libjava/java/util/Vector.java b/libjava/java/util/Vector.java index d72788e3018..edc14a4e99a 100644 --- a/libjava/java/util/Vector.java +++ b/libjava/java/util/Vector.java @@ -37,6 +37,9 @@ exception statement from your version. */ package java.util; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.reflect.Array; @@ -912,4 +915,18 @@ public class Vector extends AbstractList if (index >= elementCount) throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount); } + + /** + * Serializes this object to the given stream. + * + * @param s the stream to write to + * @throws IOException if the underlying stream fails + * @serialData just calls default write function + */ + private synchronized void writeObject(ObjectOutputStream s) + throws IOException + { + s.defaultWriteObject(); + } + } |