This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.text.DecimalFormatSymbols


Hi list,


I commited the attached patch to merge java.text.DecimalFormatSymbols from 
classpath again.


Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2378
diff -u -b -B -r1.2378 ChangeLog
--- ChangeLog	27 Nov 2003 09:43:00 -0000	1.2378
+++ ChangeLog	27 Nov 2003 09:48:39 -0000
@@ -1,5 +1,12 @@
 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
 
 2003-11-27  Guilhem Lavaux <guilhem@kaffe.org>
Index: java/text/DecimalFormatSymbols.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/DecimalFormatSymbols.java,v
retrieving revision 1.10
diff -u -b -B -r1.10 DecimalFormatSymbols.java
--- java/text/DecimalFormatSymbols.java	19 Nov 2003 12:06:38 -0000	1.10
+++ java/text/DecimalFormatSymbols.java	27 Nov 2003 09:48:39 -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.
+   * 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 = 1;
+  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 @@
       {
         monetarySeparator = decimalSeparator;
 	exponential = 'E';
-	serialVersionOnStream = 1;
       }
+    if (serialVersionOnStream < 2)
+	locale = Locale.getDefault();
+
+    serialVersionOnStream = 2;
   }
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]