From 84b1d821501a5acd4298b3561e951333df771cd8 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Mon, 14 Jun 2004 15:51:37 +0000 Subject: [PATCH] Calendar.java: Change ResourceBundle.getBundle() calls to pass ClassLoader argument. * 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 | 14 ++++++++++++++ libjava/java/awt/Window.java | 3 ++- libjava/java/text/BreakIterator.java | 2 +- libjava/java/text/Collator.java | 2 +- libjava/java/text/DateFormat.java | 2 +- libjava/java/text/DateFormatSymbols.java | 3 ++- libjava/java/text/DecimalFormatSymbols.java | 2 +- libjava/java/text/NumberFormat.java | 2 +- libjava/java/util/Calendar.java | 3 ++- libjava/java/util/Currency.java | 7 +++++-- libjava/java/util/GregorianCalendar.java | 3 ++- 11 files changed, 32 insertions(+), 11 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8121d8060f8..8798912dfd8 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,17 @@ +2004-06-14 Bryce McKinlay + + * 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 * java/lang/System.java: (getenv0): New method. diff --git a/libjava/java/awt/Window.java b/libjava/java/awt/Window.java index 51b00dc175d..2e198740b6f 100644 --- a/libjava/java/awt/Window.java +++ b/libjava/java/awt/Window.java @@ -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); } diff --git a/libjava/java/text/BreakIterator.java b/libjava/java/text/BreakIterator.java index 217d2a925dd..e97b6587707 100644 --- a/libjava/java/text/BreakIterator.java +++ b/libjava/java/text/BreakIterator.java @@ -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) diff --git a/libjava/java/text/Collator.java b/libjava/java/text/Collator.java index 7944d9501e5..7797962d4f9 100644 --- a/libjava/java/text/Collator.java +++ b/libjava/java/text/Collator.java @@ -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) diff --git a/libjava/java/text/DateFormat.java b/libjava/java/text/DateFormat.java index 0947b8058ad..3b489fae7eb 100644 --- a/libjava/java/text/DateFormat.java +++ b/libjava/java/text/DateFormat.java @@ -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) { diff --git a/libjava/java/text/DateFormatSymbols.java b/libjava/java/text/DateFormatSymbols.java index 33a541bd1b7..0d619516d36 100644 --- a/libjava/java/text/DateFormatSymbols.java +++ b/libjava/java/text/DateFormatSymbols.java @@ -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"); diff --git a/libjava/java/text/DecimalFormatSymbols.java b/libjava/java/text/DecimalFormatSymbols.java index 843b6020b3a..39de36b7ae0 100644 --- a/libjava/java/text/DecimalFormatSymbols.java +++ b/libjava/java/text/DecimalFormatSymbols.java @@ -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) { diff --git a/libjava/java/text/NumberFormat.java b/libjava/java/text/NumberFormat.java index 6520f7524e0..47a4eaae575 100644 --- a/libjava/java/text/NumberFormat.java +++ b/libjava/java/text/NumberFormat.java @@ -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) { diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index 11b0aacf940..0c671e1c040 100644 --- a/libjava/java/util/Calendar.java +++ b/libjava/java/util/Calendar.java @@ -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()); } /** diff --git a/libjava/java/util/Currency.java b/libjava/java/util/Currency.java index fa98927377b..472351281fc 100644 --- a/libjava/java/util/Currency.java +++ b/libjava/java/util/Currency.java @@ -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"); diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java index 8f644cba041..9de433389bd 100644 --- a/libjava/java/util/GregorianCalendar.java +++ b/libjava/java/util/GregorianCalendar.java @@ -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()); } /** -- 2.30.2