diff options
author | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-10 23:09:08 +0000 |
---|---|---|
committer | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-10 23:09:08 +0000 |
commit | b6d027192b68657e541c9e102d76e5a9795f909d (patch) | |
tree | 73981b1d015f53aedc47744c8b4d7eb03d1d690b /libjava/java/text/DecimalFormat.java | |
parent | e531fd0b73393a3ed2aea20196a8e7679c7330ec (diff) | |
download | gcc-b6d027192b68657e541c9e102d76e5a9795f909d.tar.gz |
* gnu/gcj/text/LocaleData_en.java (monetarySeparator): Added.
* java/sql/Date.java (serialVersionUID): New field.
* java/sql/Time.java (serialVersionUID): New field.
* java/sql/Timestamp.java (serialVersionUID): New field.
* java/text/ChoiceFormat.java (serialVersionUID): New field.
* java/text/DateFormat.java (getDateTimeInstance (int)): Removed.
* java/text/DateFormatSymbols.java (serialVersionUID): New field.
* java/text/DecimalFormat.java (serialVersionOnStream): New field.
(readObject): New serialization method.
* java/text/DecimalFormatSymbols.java (monetarySeparator): New field.
(serialVersionOnStream): New field.
(readObject): New serialization method.
(getMonetaryDecimalSeparator): New method.
(setMonetaryDecimalSeparator): New method.
* java/text/NumberFormat.java (maxFractionDigits): New field.
(maxIntegerDigits): New field.
(minFractionDigits): New field.
(minIntegerDigits): New field.
(serialVersionOnStream): New field.
(serialVersionUID): New field.
(readObject): New serialization method.
(writeObject): New serialization method.
* java/text/SimpleDateFormat.java (defaultCenturyStart): Initialized.
(serialVersionOnStream): New field.
(serialVersionUID): New field.
(readObject): New serialization method.
Serialization mods.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/text/DecimalFormat.java')
-rw-r--r-- | libjava/java/text/DecimalFormat.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libjava/java/text/DecimalFormat.java b/libjava/java/text/DecimalFormat.java index 9e7513eebaa..42c81078cb2 100644 --- a/libjava/java/text/DecimalFormat.java +++ b/libjava/java/text/DecimalFormat.java @@ -1,6 +1,6 @@ // DecimalFormat.java - Localized number formatting. -/* Copyright (C) 1999 Free Software Foundation +/* Copyright (C) 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -13,6 +13,8 @@ package java.text; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; +import java.io.ObjectInputStream; +import java.io.IOException; /** * @author Tom Tromey <tromey@cygnus.com> @@ -20,7 +22,7 @@ import java.util.ResourceBundle; */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. - * Status: Believed complete and correct to 1.2, except serialization. + * Status: Believed complete and correct to 1.2. * Note however that the docs are very unclear about how format parsing * should work. No doubt there are problems here. */ @@ -976,8 +978,21 @@ public class DecimalFormat extends NumberFormat private String negativeSuffix; private String positivePrefix; private String positiveSuffix; + private int serialVersionOnStream = 1; private DecimalFormatSymbols symbols; private boolean useExponentialNotation; + private static final long serialVersionUID = 864413376551465018L; + + private void readObject(ObjectInputStream stream) + throws IOException, ClassNotFoundException + { + stream.defaultReadObject(); + if (serialVersionOnStream < 1) + { + useExponentialNotation = false; + serialVersionOnStream = 1; + } + } // The locale-independent pattern symbols happen to be the same as // the US symbols. |