Here is an adaptation of the former patch concerning java/text. This one is small and concerns only java/text/DecimalFormatSymbols. According to the official specification, if the serial version is greater than 2, you have to read the locale field. This is what is done here.
Regards, Guilhem.
ChangeLog entry:
2003-11-21 Guilhem Lavaux <[EMAIL PROTECTED]>
* java/text/DecimalFormatSymbols.java (locale): New field. (serialVersionOnStream): Upgraded to number 2 (readObject): updated to assign locale if it wasn't by the serializer.
Index: java/text/DecimalFormatSymbols.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/DecimalFormatSymbols.java,v
retrieving revision 1.7
diff -u -r1.7 DecimalFormatSymbols.java
--- java/text/DecimalFormatSymbols.java 15 Nov 2003 21:45:27 -0000 1.7
+++ java/text/DecimalFormatSymbols.java 21 Nov 2003 19:14:00 -0000
@@ -158,6 +158,7 @@
percent = safeGetChar (res, "percent", '%');
perMill = safeGetChar (res, "perMill", '\u2030');
zeroDigit = safeGetChar (res, "zeroDigit", '0');
+ locale = loc;
}
/**
@@ -580,13 +581,20 @@
/**
* @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,11 @@
{
monetarySeparator = decimalSeparator;
exponential = 'E';
- serialVersionOnStream = 1;
}
+ if (serialVersionOnStream < 2)
+ {
+ locale = Locale.getDefault();
+ }
+ serialVersionOnStream = 2;
}
}
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

