At the suggestion of [EMAIL PROTECTED], I made a new patch which fixes
the problem by preventing the call to setCurrency when with a new
currency instead of chainging the definition of setCurrency.

-stew


diff -ru sablevm-classlib-1.1.9/java/text/DecimalFormatSymbols.java
sablevm-classlib-1.1.9-fixed/java/text/DecimalFormatSymbols.java
--- sablevm-classlib-1.1.9/java/text/DecimalFormatSymbols.java  2005-01-20 
10:27:39.000000000 -0500
+++ sablevm-classlib-1.1.9-fixed/java/text/DecimalFormatSymbols.java   
2005-03-12 17:11:35.000000000 -0500
@@ -148,7 +148,16 @@
       {
        res = null;
       }
-    setCurrency(Currency.getInstance(loc));
+
+    Currency currency = Currency.getInstance(loc);
+        // some locales don't have a currency instance, such as "en"
+        // only call setCurrency if if a currency instance exists
+        // to prevent a null pointer exception
+        // [EMAIL PROTECTED] 2005/03/12
+    if( currency != null )
+    {
+        setCurrency(Currency.getInstance(loc));
+    }
     decimalSeparator = safeGetChar (res, "decimalSeparator", '.');
     digit = safeGetChar (res, "digit", '#');
     exponential = safeGetChar (res, "exponential", 'E');

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to