Calendar.java: Change ResourceBundle.getBundle() calls to pass ClassLoader argument.
authorBryce McKinlay <mckinlay@redhat.com>
Mon, 14 Jun 2004 15:51:37 +0000 (15:51 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Mon, 14 Jun 2004 15:51:37 +0000 (16:51 +0100)
* java/util/Calendar.java: Change ResourceBundle.getBundle() calls
to pass ClassLoader argument.
* java/util/GregorianCalendar.java: Likewise.
* java/util/Currency.java: Likewise.
* java/text/BreakIterator.java: Likewise.
* java/text/Collator.java: Likewise.
* java/text/DateFormat.java: Likewise.
* java/text/DateFormatSymbols.java: Likewise.
* java/text/DecimalFormatSymbols.java: Likewise.
* java/text/NumberFormat.java: Likewise.
* java/awt/Window.java: Likewise.

From-SVN: r83109

libjava/ChangeLog
libjava/java/awt/Window.java
libjava/java/text/BreakIterator.java
libjava/java/text/Collator.java
libjava/java/text/DateFormat.java
libjava/java/text/DateFormatSymbols.java
libjava/java/text/DecimalFormatSymbols.java
libjava/java/text/NumberFormat.java
libjava/java/util/Calendar.java
libjava/java/util/Currency.java
libjava/java/util/GregorianCalendar.java

index 8121d8060f8a24201e1cb87454e1a281fefd6f3c..8798912dfd81fc2ae6865c2143246c502ed608d7 100644 (file)
@@ -1,3 +1,17 @@
+2004-06-14  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * java/util/Calendar.java: Change ResourceBundle.getBundle() calls
+       to pass ClassLoader argument.
+       * java/util/GregorianCalendar.java: Likewise.
+       * java/util/Currency.java: Likewise.
+       * java/text/BreakIterator.java: Likewise.
+       * java/text/Collator.java: Likewise.
+       * java/text/DateFormat.java: Likewise.
+       * java/text/DateFormatSymbols.java: Likewise.
+       * java/text/DecimalFormatSymbols.java: Likewise.
+       * java/text/NumberFormat.java: Likewise.
+       * java/awt/Window.java: Likewise.
+
 2004-06-14  Andrew Haley  <aph@redhat.com>
 
        * java/lang/System.java: (getenv0): New method.
index 51b00dc175d194e6f9119da9fbe90b4618483105..2e198740b6f84639a6ccb3dcf6bb609d94dd7a85 100644 (file)
@@ -703,7 +703,8 @@ public class Window extends Container implements Accessible
    */
   public void applyResourceBundle(String rbName)
   {
-    ResourceBundle rb = ResourceBundle.getBundle(rbName);
+    ResourceBundle rb = ResourceBundle.getBundle(rbName, Locale.getDefault(),
+      Window.class.getClassLoader());
     if (rb != null)
       applyResourceBundle(rb);    
   }
index 217d2a925dd15627beb6221fdc8db32d623f590c..e97b6587707292d18041a18153771927cc047215 100644 (file)
@@ -136,7 +136,7 @@ public abstract class BreakIterator implements Cloneable
       {
        ResourceBundle res
          = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
-                                    loc);
+                                    loc, BreakIterator.class.getClassLoader());
        className = res.getString(type);
       }
     catch (MissingResourceException x)
index 7944d9501e5fca9453b14170465095159a6e03ab..7797962d4f907fb648e99ec3e4d36d68250cf26a 100644 (file)
@@ -303,7 +303,7 @@ public abstract class Collator implements Comparator, Cloneable
     try
       {
        res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
-                                      loc);
+                                      loc, Collator.class.getClassLoader());
        pattern = res.getString("collation_rules");
       }
     catch (MissingResourceException x)
index 0947b8058adb064c221cf1d5c532ad501a9c2f02..3b489fae7eb2692be8040082531ab78a6f422756 100644 (file)
@@ -325,7 +325,7 @@ public abstract class DateFormat extends Format implements Cloneable
     try
       {
        res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
-                                      loc);
+                                      loc, DateFormat.class.getClassLoader());
       }
     catch (MissingResourceException x)
       {
index 33a541bd1b7c5d89ca6e27c98c8c537e53b7437d..0d619516d36d882450c23c41dd36f978555ef6fc 100644 (file)
@@ -98,7 +98,8 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
   public DateFormatSymbols (Locale locale) throws MissingResourceException
   {
     ResourceBundle res
-      = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale);
+      = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
+                                getClass().getClassLoader());
 
     ampms = res.getStringArray ("ampms");
     eras = res.getStringArray ("eras");
index 843b6020b3a8273fee7338a40947554544ca8141..39de36b7ae00c2e87f1ef42c8cda6b13a31a7c5f 100644 (file)
@@ -130,7 +130,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
     try
       {
        res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
-                                      loc);
+               loc, DecimalFormatSymbols.class.getClassLoader());
       }
     catch (MissingResourceException x)
       {
index 6520f7524e0abf6540d035f700917d7bede43ee3..47a4eaae575a7b1fd71482e873dbb1895cf6d4d6 100644 (file)
@@ -310,7 +310,7 @@ public abstract class NumberFormat extends Format implements Cloneable
     try
       {
        res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
-                                      loc);
+               loc, NumberFormat.class.getClassLoader());
       }
     catch (MissingResourceException x)
       {
index 11b0aacf940ce769b348b35b4b5b63f9fbb4a179..0c671e1c040f28e2c44816a79f47943b05ac1d2f 100644 (file)
@@ -376,7 +376,8 @@ public abstract class Calendar implements Serializable, Cloneable
    */
   private static ResourceBundle getBundle(Locale locale) 
   {
-    return ResourceBundle.getBundle(bundleName, locale);
+    return ResourceBundle.getBundle(bundleName, locale,
+      Calendar.class.getClassLoader());
   }
 
   /**
index fa98927377b4109192a90bcc627ca5f49afb4c17..472351281fcca6751ee8b58d6667ba195679c61b 100644 (file)
@@ -54,7 +54,8 @@ public final class Currency implements Serializable
   private Currency (Locale loc)
   {
     this.locale = loc;
-    this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", locale);
+    this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", 
+      locale, Currency.class.getClassLoader());
   }
 
   /**
@@ -148,7 +149,9 @@ public final class Currency implements Serializable
     // First we need to implement fully LocaleInformation*.java
     try
       {
-       ResourceBundle res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", locale);
+       ResourceBundle res = 
+         ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", 
+                                   locale, Currency.class.getClassLoader());
 
        if (res.equals(this.res))
          return res.getString ("currencySymbol");
index 8f644cba0414af2eaaa0256d4614e90cc4cb8d3e..9de433389bde8ed7a4adade77f598af3656aa99e 100644 (file)
@@ -90,7 +90,8 @@ public class GregorianCalendar extends Calendar
    */
   private static ResourceBundle getBundle(Locale locale) 
   {
-    return ResourceBundle.getBundle(bundleName, locale);
+    return ResourceBundle.getBundle(bundleName, locale,
+      GregorianCalendar.class.getClassLoader());
   }
 
   /**