Commit 95f5c6a2 by Guilhem Lavaux Committed by Michael Koch

DecimalFormatSymbols.java (locale): New field.

2003-11-27  Guilhem Lavaux <guilhem@kaffe.org>

	* 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.

From-SVN: r73987
parent 76167dc0
2003-11-27 Guilhem Lavaux <guilhem@kaffe.org> 2003-11-27 Guilhem Lavaux <guilhem@kaffe.org>
* 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.
2003-11-27 Guilhem Lavaux <guilhem@kaffe.org>
* java/text/FormatCharacterIterator.java: Documented the class and * java/text/FormatCharacterIterator.java: Documented the class and
2003-11-27 Guilhem Lavaux <guilhem@kaffe.org> 2003-11-27 Guilhem Lavaux <guilhem@kaffe.org>
......
...@@ -158,6 +158,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable ...@@ -158,6 +158,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
percent = safeGetChar (res, "percent", '%'); percent = safeGetChar (res, "percent", '%');
perMill = safeGetChar (res, "perMill", '\u2030'); perMill = safeGetChar (res, "perMill", '\u2030');
zeroDigit = safeGetChar (res, "zeroDigit", '0'); zeroDigit = safeGetChar (res, "zeroDigit", '0');
locale = loc;
} }
/** /**
...@@ -580,13 +581,20 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable ...@@ -580,13 +581,20 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
/** /**
* @serial This value represents the type of object being de-serialized. * @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. * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later.
*/ * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later,
private int serialVersionOnStream = 1; * 2 indicates 1.4 or later
*/
private int serialVersionOnStream = 2;
/** /**
* @serial This is the character used to represent 0. * @serial This is the character used to represent 0.
*/ */
private char zeroDigit; private char zeroDigit;
/**
* @serial The locale of these currency symbols.
*/
private Locale locale;
private static final long serialVersionUID = 5772796243397350300L; private static final long serialVersionUID = 5772796243397350300L;
private void readObject(ObjectInputStream stream) private void readObject(ObjectInputStream stream)
...@@ -597,7 +605,10 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable ...@@ -597,7 +605,10 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
{ {
monetarySeparator = decimalSeparator; monetarySeparator = decimalSeparator;
exponential = 'E'; exponential = 'E';
serialVersionOnStream = 1;
} }
if (serialVersionOnStream < 2)
locale = Locale.getDefault();
serialVersionOnStream = 2;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment