From 30c163f6fc8dacd55e65db2f52108faa0a20d5c5 Mon Sep 17 00:00:00 2001 From: mkoch Date: Thu, 27 Nov 2003 09:49:22 +0000 Subject: 2003-11-27 Guilhem Lavaux * java/text/DecimalFormatSymbols.java (locale): New field. (DecimalFormatSymbols (Locale)): Set locale. (serialVersionOnStream): Upgraded to number 2. (readObject): Assign locale if it wasn't by the serializer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73987 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/text/DecimalFormatSymbols.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/text/DecimalFormatSymbols.java b/libjava/java/text/DecimalFormatSymbols.java index 1cb8f4f1769..268fe2cf987 100644 --- a/libjava/java/text/DecimalFormatSymbols.java +++ b/libjava/java/text/DecimalFormatSymbols.java @@ -158,6 +158,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable percent = safeGetChar (res, "percent", '%'); perMill = safeGetChar (res, "perMill", '\u2030'); zeroDigit = safeGetChar (res, "zeroDigit", '0'); + locale = loc; } /** @@ -580,13 +581,20 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable /** * @serial This value represents the type of object being de-serialized. * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later. - */ - private int serialVersionOnStream = 1; + * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later, + * 2 indicates 1.4 or later + */ + private int serialVersionOnStream = 2; /** * @serial This is the character used to represent 0. */ private char zeroDigit; + /** + * @serial The locale of these currency symbols. + */ + private Locale locale; + private static final long serialVersionUID = 5772796243397350300L; private void readObject(ObjectInputStream stream) @@ -597,7 +605,10 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable { monetarySeparator = decimalSeparator; exponential = 'E'; - serialVersionOnStream = 1; } + if (serialVersionOnStream < 2) + locale = Locale.getDefault(); + + serialVersionOnStream = 2; } } -- cgit v1.2.3