From bc6ccd33161419ac05ed369d874a9d697805bcaa Mon Sep 17 00:00:00 2001 From: Warren Levy Date: Fri, 8 Sep 2000 19:37:09 +0000 Subject: [PATCH] PropertyChangeEvent.java (serialVersionUID): Added. * java/beans/PropertyChangeEvent.java (serialVersionUID): Added. * java/beans/PropertyVetoException.java (serialVersionUID): Added. * java/io/File.java (writeObject): Added. (readObject): Added. (serialVersionUID): Added. * java/io/ObjectOutputStream.java (writeObject): Initialized fieldsAlreadyWritten before recursion rather than after. * java/io/ObjectStreamClass.java (serialVersionUID): Added. * java/io/OptionalDataException.java (serialVersionUID): Added. (OptionalDataException): Made package private. * java/io/SyncFailedException.java (SyncFailedException): Removed default constructor to match spec. * java/lang/Boolean.java (serialVersionUID): Added. * java/lang/Byte.java (serialVersionUID): Added. * java/lang/Character.java (serialVersionUID): Added. * java/lang/Double.java (serialVersionUID): Added. * java/lang/Float.java (serialVersionUID): Added. * java/lang/Integer.java (serialVersionUID): Added. * java/lang/Long.java (serialVersionUID): Added. * java/lang/Number.java (serialVersionUID): Added. * java/lang/Short.java (serialVersionUID): Added. * java/lang/String.java (serialVersionUID): Added. * java/lang/ThreadDeath.java (ThreadDeath): Removed constructor to match spec. * java/lang/reflect/InvocationTargetException.java (serialVersionUID): Added. * java/net/URL.java (handler): Made transient. (hashCode): Added field for serialization, per spec. and use cached value if available. (serialVersionUID): Added. (URL): Initialize hashCode. (set): Adjust hashCode. (readObject): New Method to initialize the protocol handler when deserializing. (writeObject): New method. * java/text/BreakIterator.java: Removed 'implements Serializable'. * java/text/Collator.java: Removed 'implements Serializable'. * java/util/GregorianCalendar.java (serialVersionUID): Added. * java/util/Properties.java (serialVersionUID): Added. * java/util/Random.java (serialVersionUID): Added. (seed): Made private. (nextNextGaussian): Made private. (haveNextNextGaussian): Made private. * java/util/Stack.java (serialVersionUID): Added. * java/util/TimeZone.java (serialVersionUID): Added. * java/util/Vector.java (serialVersionUID): Added. Serialization mods. From-SVN: r36272 --- libjava/ChangeLog | 49 +++++++++++++++++++ libjava/java/beans/PropertyChangeEvent.java | 2 + libjava/java/beans/PropertyVetoException.java | 2 + libjava/java/io/File.java | 20 ++++++++ libjava/java/io/ObjectOutputStream.java | 4 +- libjava/java/io/ObjectStreamClass.java | 4 ++ libjava/java/io/OptionalDataException.java | 8 ++- libjava/java/io/SyncFailedException.java | 5 -- libjava/java/lang/Boolean.java | 4 +- libjava/java/lang/Byte.java | 4 +- libjava/java/lang/Character.java | 3 +- libjava/java/lang/Double.java | 2 + libjava/java/lang/Float.java | 4 +- libjava/java/lang/Integer.java | 4 +- libjava/java/lang/Long.java | 4 +- libjava/java/lang/Number.java | 4 +- libjava/java/lang/Short.java | 4 +- libjava/java/lang/String.java | 4 ++ libjava/java/lang/ThreadDeath.java | 7 +-- .../reflect/InvocationTargetException.java | 4 +- libjava/java/net/URL.java | 30 ++++++++++-- libjava/java/text/BreakIterator.java | 3 +- libjava/java/text/Collator.java | 3 +- libjava/java/util/GregorianCalendar.java | 2 + libjava/java/util/Properties.java | 2 + libjava/java/util/Random.java | 8 +-- libjava/java/util/Stack.java | 2 + libjava/java/util/TimeZone.java | 2 + libjava/java/util/Vector.java | 2 + 29 files changed, 162 insertions(+), 34 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 01ab720d1a6..3164f0cb7ff 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,52 @@ +2000-09-08 Warren Levy + + * java/beans/PropertyChangeEvent.java (serialVersionUID): Added. + * java/beans/PropertyVetoException.java (serialVersionUID): Added. + * java/io/File.java (writeObject): Added. + (readObject): Added. + (serialVersionUID): Added. + * java/io/ObjectOutputStream.java (writeObject): Initialized + fieldsAlreadyWritten before recursion rather than after. + * java/io/ObjectStreamClass.java (serialVersionUID): Added. + * java/io/OptionalDataException.java (serialVersionUID): Added. + (OptionalDataException): Made package private. + * java/io/SyncFailedException.java (SyncFailedException): Removed + default constructor to match spec. + * java/lang/Boolean.java (serialVersionUID): Added. + * java/lang/Byte.java (serialVersionUID): Added. + * java/lang/Character.java (serialVersionUID): Added. + * java/lang/Double.java (serialVersionUID): Added. + * java/lang/Float.java (serialVersionUID): Added. + * java/lang/Integer.java (serialVersionUID): Added. + * java/lang/Long.java (serialVersionUID): Added. + * java/lang/Number.java (serialVersionUID): Added. + * java/lang/Short.java (serialVersionUID): Added. + * java/lang/String.java (serialVersionUID): Added. + * java/lang/ThreadDeath.java (ThreadDeath): Removed constructor + to match spec. + * java/lang/reflect/InvocationTargetException.java + (serialVersionUID): Added. + * java/net/URL.java (handler): Made transient. + (hashCode): Added field for serialization, per spec. and use + cached value if available. + (serialVersionUID): Added. + (URL): Initialize hashCode. + (set): Adjust hashCode. + (readObject): New Method to initialize the protocol handler when + deserializing. + (writeObject): New method. + * java/text/BreakIterator.java: Removed 'implements Serializable'. + * java/text/Collator.java: Removed 'implements Serializable'. + * java/util/GregorianCalendar.java (serialVersionUID): Added. + * java/util/Properties.java (serialVersionUID): Added. + * java/util/Random.java (serialVersionUID): Added. + (seed): Made private. + (nextNextGaussian): Made private. + (haveNextNextGaussian): Made private. + * java/util/Stack.java (serialVersionUID): Added. + * java/util/TimeZone.java (serialVersionUID): Added. + * java/util/Vector.java (serialVersionUID): Added. + 2000-09-07 Bryce McKinlay * Makefile.am (Thread.h): Don't be friends with native threads diff --git a/libjava/java/beans/PropertyChangeEvent.java b/libjava/java/beans/PropertyChangeEvent.java index f48d5fe535b..3dc347809a7 100644 --- a/libjava/java/beans/PropertyChangeEvent.java +++ b/libjava/java/beans/PropertyChangeEvent.java @@ -54,6 +54,8 @@ public class PropertyChangeEvent extends java.util.EventObject { Object newValue; Object propagationId; + private static final long serialVersionUID = 7042693688939648123L; + /** Create a new PropertyChangeEvent. Remember that if ** you received a PropertyChangeEvent and are sending ** a new one, you should also set the propagation ID diff --git a/libjava/java/beans/PropertyVetoException.java b/libjava/java/beans/PropertyVetoException.java index 989b9e0281d..daad0105c79 100644 --- a/libjava/java/beans/PropertyVetoException.java +++ b/libjava/java/beans/PropertyVetoException.java @@ -39,6 +39,8 @@ package java.beans; public class PropertyVetoException extends Exception { PropertyChangeEvent evt; + private static final long serialVersionUID = 129596057694162164L; + /** Instantiate this exception with the given message and property change. ** @param msg the reason for the veto. ** @param changeEvent the PropertyChangeEvent that was thrown. diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index 01d8d53fee9..fc3477c040b 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -388,6 +388,24 @@ public class File implements Serializable FileDeleter.add (this); } + private void writeObject (ObjectOutputStream oos) throws IOException + { + oos.defaultWriteObject (); + oos.writeChar (separatorChar); + } + + private void readObject (ObjectInputStream ois) + throws ClassNotFoundException, IOException + { + ois.defaultReadObject (); + + // If the file was from an OS with a different dir separator, + // fixup the path to use the separator on this OS. + char oldSeparatorChar = ois.readChar (); + if (oldSeparatorChar != separatorChar) + path = path.replace (oldSeparatorChar, separatorChar); + } + // QUERY arguments to access function. private final static int READ = 0; private final static int WRITE = 1; @@ -404,4 +422,6 @@ public class File implements Serializable private final native long attr (String p, int query); private final native boolean access (String p, int query); private final native boolean stat (String p, int query); + + private static final long serialVersionUID = 301077366599181567L; } diff --git a/libjava/java/io/ObjectOutputStream.java b/libjava/java/io/ObjectOutputStream.java index c4ffc8c6d1e..664b882e229 100644 --- a/libjava/java/io/ObjectOutputStream.java +++ b/libjava/java/io/ObjectOutputStream.java @@ -313,12 +313,12 @@ public class ObjectOutputStream extends OutputStream { currentObjectStreamClass = hierarchy[i]; + fieldsAlreadyWritten = false; has_write = currentObjectStreamClass.hasWriteMethod (); + writeFields (obj, currentObjectStreamClass.fields, has_write); - fieldsAlreadyWritten = false; - if (has_write) { drain (); diff --git a/libjava/java/io/ObjectStreamClass.java b/libjava/java/io/ObjectStreamClass.java index 5bd867fa5ee..085c72b2da3 100644 --- a/libjava/java/io/ObjectStreamClass.java +++ b/libjava/java/io/ObjectStreamClass.java @@ -635,6 +635,10 @@ public class ObjectStreamClass implements Serializable // these are accessed by ObjectIn/OutputStream int primFieldSize = -1; // -1 if not yet calculated int objectFieldCount; + + // This is probably not necessary because this class is special cased already + // but it will avoid showing up as a discrepancy when comparing SUIDs. + private static final long serialVersionUID = -6120832682080437368L; } diff --git a/libjava/java/io/OptionalDataException.java b/libjava/java/io/OptionalDataException.java index eabda73696b..ed4624b257c 100644 --- a/libjava/java/io/OptionalDataException.java +++ b/libjava/java/io/OptionalDataException.java @@ -23,12 +23,16 @@ public class OptionalDataException extends ObjectStreamException public boolean eof; public int length; - public OptionalDataException() + // FIXME: This can probably go away once the right signatures of + // these package private constructors is determined. + private static final long serialVersionUID = -8011121865681257820L; + + OptionalDataException() { super(); } - public OptionalDataException(String msg) + OptionalDataException(String msg) { super(msg); } diff --git a/libjava/java/io/SyncFailedException.java b/libjava/java/io/SyncFailedException.java index 05f4c3dee7b..964d24a220b 100644 --- a/libjava/java/io/SyncFailedException.java +++ b/libjava/java/io/SyncFailedException.java @@ -22,11 +22,6 @@ package java.io; public class SyncFailedException extends IOException { - public SyncFailedException () - { - super (); - } - public SyncFailedException (String s) { super (s); diff --git a/libjava/java/lang/Boolean.java b/libjava/java/lang/Boolean.java index 041f72521eb..027fd24da83 100644 --- a/libjava/java/lang/Boolean.java +++ b/libjava/java/lang/Boolean.java @@ -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. @@ -32,6 +32,8 @@ public final class Boolean extends Object implements Serializable /* The boolean value of the instance. */ private boolean value; + private static final long serialVersionUID = -3665804199014368530L; + public Boolean(boolean boolVal) { value = boolVal; diff --git a/libjava/java/lang/Byte.java b/libjava/java/lang/Byte.java index 95db094f420..78f34aa64a3 100644 --- a/libjava/java/lang/Byte.java +++ b/libjava/java/lang/Byte.java @@ -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. @@ -29,6 +29,8 @@ public final class Byte extends Number implements Comparable // by javac, and is handled specially by gcc. public static final Class TYPE = byte.class; + private static final long serialVersionUID = -7183698231559129828L; + public Byte(byte value) { this.value = value; diff --git a/libjava/java/lang/Character.java b/libjava/java/lang/Character.java index 4306afb0881..2695b0409c0 100644 --- a/libjava/java/lang/Character.java +++ b/libjava/java/lang/Character.java @@ -1,6 +1,6 @@ // Character.java - Character class. -/* Copyright (C) 1998, 1999 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -83,6 +83,7 @@ public final class Character implements Serializable, Comparable public static final byte PRIVATE_USE = 18; public static final byte SURROGATE = 19; + private static final long serialVersionUID = 3786198910865385080L; public Character (char ch) { diff --git a/libjava/java/lang/Double.java b/libjava/java/lang/Double.java index cb8fd9551d5..10e9093cde5 100644 --- a/libjava/java/lang/Double.java +++ b/libjava/java/lang/Double.java @@ -32,6 +32,8 @@ public final class Double extends Number private double value; + private static final long serialVersionUID = -9172774392245257468L; + public native static double parseDouble (String s) throws NumberFormatException; diff --git a/libjava/java/lang/Float.java b/libjava/java/lang/Float.java index 63c6fa1e184..b5939de4d0e 100644 --- a/libjava/java/lang/Float.java +++ b/libjava/java/lang/Float.java @@ -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. @@ -32,6 +32,8 @@ public final class Float extends Number private float value; + private static final long serialVersionUID = -2671257302660747028L; + public Float (float value) { this.value = value; diff --git a/libjava/java/lang/Integer.java b/libjava/java/lang/Integer.java index feb77851e58..163c8501515 100644 --- a/libjava/java/lang/Integer.java +++ b/libjava/java/lang/Integer.java @@ -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. @@ -30,6 +30,8 @@ public final class Integer extends Number implements Comparable /* The int value of the instance. */ private int value; + private static final long serialVersionUID = 1360826667806852920L; + public Integer(int val) { value = val; diff --git a/libjava/java/lang/Long.java b/libjava/java/lang/Long.java index 95f426d2206..e6872dbc49f 100644 --- a/libjava/java/lang/Long.java +++ b/libjava/java/lang/Long.java @@ -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. @@ -30,6 +30,8 @@ public final class Long extends Number implements Comparable /* The long value of the instance. */ private long value; + private static final long serialVersionUID = 4290774380558885855L; + public Long(long val) { value = val; diff --git a/libjava/java/lang/Number.java b/libjava/java/lang/Number.java index 9fa05662fd5..92d98afbfb6 100644 --- a/libjava/java/lang/Number.java +++ b/libjava/java/lang/Number.java @@ -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. @@ -36,4 +36,6 @@ public abstract class Number implements Serializable { return (short) intValue(); } + + private static final long serialVersionUID = -8742448824652078965L; } diff --git a/libjava/java/lang/Short.java b/libjava/java/lang/Short.java index a8bd9658284..6733607da14 100644 --- a/libjava/java/lang/Short.java +++ b/libjava/java/lang/Short.java @@ -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. @@ -29,6 +29,8 @@ public final class Short extends Number implements Comparable // by javac, and is handled specially by gcc. public static final Class TYPE = short.class; + private static final long serialVersionUID = 7515723908773894738L; + public Short(short value) { this.value = value; diff --git a/libjava/java/lang/String.java b/libjava/java/lang/String.java index 12f8789f04b..9937374f1bc 100644 --- a/libjava/java/lang/String.java +++ b/libjava/java/lang/String.java @@ -26,6 +26,10 @@ public final class String implements Serializable, Comparable private int boffset; // Note this is a byte offset - don't use in Java code! private int count; + // This is probably not necessary because this class is special cased already + // but it will avoid showing up as a discrepancy when comparing SUIDs. + private static final long serialVersionUID = -6849794470754667710L; + public String () { init(); diff --git a/libjava/java/lang/ThreadDeath.java b/libjava/java/lang/ThreadDeath.java index d02c2fc9d97..ae0e3fb40f6 100644 --- a/libjava/java/lang/ThreadDeath.java +++ b/libjava/java/lang/ThreadDeath.java @@ -1,6 +1,6 @@ // ThreadDeath.java - Special exception registering Thread death. -/* Copyright (C) 1998, 1999 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -27,9 +27,4 @@ public class ThreadDeath extends Error { super (); } - - public ThreadDeath (String message) - { - super (message); - } } diff --git a/libjava/java/lang/reflect/InvocationTargetException.java b/libjava/java/lang/reflect/InvocationTargetException.java index 3d59506c2e4..0152a7bf2f5 100644 --- a/libjava/java/lang/reflect/InvocationTargetException.java +++ b/libjava/java/lang/reflect/InvocationTargetException.java @@ -1,6 +1,6 @@ // InvocationTargetException.java - Wrapper exception for reflection. -/* Copyright (C) 1998, 1999 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -70,4 +70,6 @@ public class InvocationTargetException extends Exception // The wrapped exception. The name is specified by the // serialization spec. private Throwable target; + + private static final long serialVersionUID = 4085088731926701167L; } diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index 5931eefa3fb..25837325fc0 100644 --- a/libjava/java/net/URL.java +++ b/libjava/java/net/URL.java @@ -1,6 +1,6 @@ // URL.java - A Uniform Resource Locator. -/* Copyright (C) 1999 Free Software Foundation +/* Copyright (C) 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -32,10 +32,13 @@ public final class URL implements Serializable private int port = -1; // Initialize for constructor using context. private String file; private String ref; - private URLStreamHandler handler; + private int hashCode = 0; + transient private URLStreamHandler handler; private static Hashtable handlers = new Hashtable(); private static URLStreamHandlerFactory factory; + private static final long serialVersionUID = -7627629688361524110L; + public URL(String protocol, String host, int port, String file) throws MalformedURLException { @@ -90,6 +93,7 @@ public final class URL implements Serializable this.file = file.substring(0, hashAt); this.ref = file.substring(hashAt + 1); } + hashCode = hashCode(); // Used for serialization. } public URL(String spec) throws MalformedURLException @@ -181,6 +185,8 @@ public final class URL implements Serializable hashAt < 0 ? spec.length() : hashAt); if (hashAt >= 0) ref = spec.substring(hashAt + 1); + + hashCode = hashCode(); // Used for serialization. } public boolean equals(Object obj) @@ -249,7 +255,10 @@ public final class URL implements Serializable // (which was reduced to "" with a hashcode of zero). A "" host also // causes the port number and the two hashcodes to be summed. - return (protocol.hashCode() + ((host == null) ? 0 : host.hashCode()) + + if (hashCode != 0) + return hashCode; // Use cached value if available. + else + return (protocol.hashCode() + ((host == null) ? 0 : host.hashCode()) + port + file.hashCode()); } @@ -290,6 +299,7 @@ public final class URL implements Serializable this.host = host; this.file = file; this.ref = ref; + hashCode = hashCode(); // Used for serialization. } public static synchronized void @@ -384,4 +394,18 @@ public final class URL implements Serializable return handler; } + + private void readObject(ObjectInputStream ois) + throws IOException, ClassNotFoundException + { + ois.defaultReadObject(); + this.handler = setURLStreamHandler(protocol); + if (this.handler == null) + throw new IOException("Handler for protocol " + protocol + " not found"); + } + + private void writeObject(ObjectOutputStream oos) throws IOException + { + oos.defaultWriteObject(); + } } diff --git a/libjava/java/text/BreakIterator.java b/libjava/java/text/BreakIterator.java index 5832695bb9d..ef971bf4f75 100644 --- a/libjava/java/text/BreakIterator.java +++ b/libjava/java/text/BreakIterator.java @@ -10,7 +10,6 @@ details. */ package java.text; -import java.io.Serializable; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -24,7 +23,7 @@ import java.util.ResourceBundle; * Status: Believed complete and correct to 1.1. */ -public abstract class BreakIterator implements Cloneable, Serializable +public abstract class BreakIterator implements Cloneable { // The value was discovered by writing a test program. public static final int DONE = -1; diff --git a/libjava/java/text/Collator.java b/libjava/java/text/Collator.java index 30b746ef599..4280ea235c3 100644 --- a/libjava/java/text/Collator.java +++ b/libjava/java/text/Collator.java @@ -10,7 +10,6 @@ details. */ package java.text; -import java.io.Serializable; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -24,7 +23,7 @@ import java.util.ResourceBundle; * Status: Mostly complete, but parts stubbed out. Look for FIXME. */ -public abstract class Collator implements Cloneable, Serializable +public abstract class Collator implements Cloneable { public static final int NO_DECOMPOSITION = 0; public static final int CANONICAL_DECOMPOSITION = 1; diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java index d293790976b..9e73131c768 100644 --- a/libjava/java/util/GregorianCalendar.java +++ b/libjava/java/util/GregorianCalendar.java @@ -89,6 +89,8 @@ public class GregorianCalendar extends Calendar { 3600000 /* DST_OFFSET */ }; + private static final long serialVersionUID = -8125100834729963327L; + public GregorianCalendar () { this(null, null); diff --git a/libjava/java/util/Properties.java b/libjava/java/util/Properties.java index 2f7a25159b7..6360b9932d9 100644 --- a/libjava/java/util/Properties.java +++ b/libjava/java/util/Properties.java @@ -33,6 +33,8 @@ public class Properties extends Hashtable { protected Properties defaults; + private static final long serialVersionUID = 4112578634029874840L; + public String getProperty (String propName) { return getProperty (propName, null); diff --git a/libjava/java/util/Random.java b/libjava/java/util/Random.java index e4bac59cad3..5ed4532050a 100644 --- a/libjava/java/util/Random.java +++ b/libjava/java/util/Random.java @@ -26,15 +26,17 @@ import java.io.Serializable; public class Random implements Serializable { /* Used by next() to hold the state of the pseudorandom number generator */ - protected long seed; + private long seed; /* Used by nextGaussian() to hold a precomputed value */ /* to be delivered by that method the next time it is called */ - protected double nextNextGaussian; + private double nextNextGaussian; /* Used by nextGaussian() to keep track of whether it is has precomputed */ /* and stashed away the next value to be delivered by that method */ - protected boolean haveNextNextGaussian = false; + private boolean haveNextNextGaussian = false; + + private static final long serialVersionUID = 3905348978240129619L; public Random() { diff --git a/libjava/java/util/Stack.java b/libjava/java/util/Stack.java index c7cb1c05753..963513ea4e0 100644 --- a/libjava/java/util/Stack.java +++ b/libjava/java/util/Stack.java @@ -71,4 +71,6 @@ public class Stack extends Vector return -1; } + + private static final long serialVersionUID = 1224463164541339165L; } diff --git a/libjava/java/util/TimeZone.java b/libjava/java/util/TimeZone.java index 02296d9471c..0145d72d11f 100644 --- a/libjava/java/util/TimeZone.java +++ b/libjava/java/util/TimeZone.java @@ -30,6 +30,8 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable private static TimeZone zoneDefault; + private static final long serialVersionUID = 3581463369166924961L; + public TimeZone () { } diff --git a/libjava/java/util/Vector.java b/libjava/java/util/Vector.java index 347d0abe7a5..81178bf6255 100644 --- a/libjava/java/util/Vector.java +++ b/libjava/java/util/Vector.java @@ -61,6 +61,8 @@ public class Vector implements Cloneable, Serializable /* The buffer in which elements of this vector are stored */ protected Object[] elementData; + private static final long serialVersionUID = -2767605614048989439L; + public Vector() { this(10, 0);