From 284d6a1fc39e6c7bcfca33d3f67a69547c646207 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Sat, 10 Jul 2004 02:26:19 +0000 Subject: [PATCH] Calendar.java: Use getSystemClassLoader as argument for ResourceBundle.getBundle() calls. 2004-07-09 Bryce McKinlay * java/util/Calendar.java: Use getSystemClassLoader as argument for ResourceBundle.getBundle() calls. * 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: r84437 --- libjava/ChangeLog | 14 ++++++++++++++ libjava/java/awt/Window.java | 2 +- libjava/java/text/BreakIterator.java | 2 +- libjava/java/text/Collator.java | 2 +- libjava/java/text/DateFormat.java | 2 +- libjava/java/text/DateFormatSymbols.java | 2 +- libjava/java/text/DecimalFormatSymbols.java | 2 +- libjava/java/text/NumberFormat.java | 2 +- libjava/java/util/Calendar.java | 3 ++- libjava/java/util/Currency.java | 2 +- libjava/java/util/GregorianCalendar.java | 2 +- 11 files changed, 25 insertions(+), 10 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 088ef4b2169..c69302e425a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,17 @@ +2004-07-09 Bryce McKinlay + + * java/util/Calendar.java: Use getSystemClassLoader as argument for + ResourceBundle.getBundle() calls. + * 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-07-09 Bryce McKinlay * java/util/ResourceBundle.java (bundleCache): Renamed from diff --git a/libjava/java/awt/Window.java b/libjava/java/awt/Window.java index 2e198740b6f..7fa471ee73b 100644 --- a/libjava/java/awt/Window.java +++ b/libjava/java/awt/Window.java @@ -704,7 +704,7 @@ public class Window extends Container implements Accessible public void applyResourceBundle(String rbName) { ResourceBundle rb = ResourceBundle.getBundle(rbName, Locale.getDefault(), - Window.class.getClassLoader()); + ClassLoader.getSystemClassLoader()); if (rb != null) applyResourceBundle(rb); } diff --git a/libjava/java/text/BreakIterator.java b/libjava/java/text/BreakIterator.java index e97b6587707..92037a3bf55 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, BreakIterator.class.getClassLoader()); + loc, ClassLoader.getSystemClassLoader()); className = res.getString(type); } catch (MissingResourceException x) diff --git a/libjava/java/text/Collator.java b/libjava/java/text/Collator.java index 7797962d4f9..6464d137041 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, Collator.class.getClassLoader()); + loc, ClassLoader.getSystemClassLoader()); pattern = res.getString("collation_rules"); } catch (MissingResourceException x) diff --git a/libjava/java/text/DateFormat.java b/libjava/java/text/DateFormat.java index 81427ebce61..c0ca73794e6 100644 --- a/libjava/java/text/DateFormat.java +++ b/libjava/java/text/DateFormat.java @@ -326,7 +326,7 @@ public abstract class DateFormat extends Format implements Cloneable try { res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", - loc, DateFormat.class.getClassLoader()); + loc, ClassLoader.getSystemClassLoader()); } catch (MissingResourceException x) { diff --git a/libjava/java/text/DateFormatSymbols.java b/libjava/java/text/DateFormatSymbols.java index 0d619516d36..b9b71ba36a7 100644 --- a/libjava/java/text/DateFormatSymbols.java +++ b/libjava/java/text/DateFormatSymbols.java @@ -99,7 +99,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable { ResourceBundle res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale, - getClass().getClassLoader()); + ClassLoader.getSystemClassLoader()); ampms = res.getStringArray ("ampms"); eras = res.getStringArray ("eras"); diff --git a/libjava/java/text/DecimalFormatSymbols.java b/libjava/java/text/DecimalFormatSymbols.java index 39de36b7ae0..be045857188 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, DecimalFormatSymbols.class.getClassLoader()); + loc, ClassLoader.getSystemClassLoader()); } catch (MissingResourceException x) { diff --git a/libjava/java/text/NumberFormat.java b/libjava/java/text/NumberFormat.java index 47a4eaae575..00d3030f0ee 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, NumberFormat.class.getClassLoader()); + loc, ClassLoader.getSystemClassLoader()); } catch (MissingResourceException x) { diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index 0c671e1c040..e1ecf3e519a 100644 --- a/libjava/java/util/Calendar.java +++ b/libjava/java/util/Calendar.java @@ -42,6 +42,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; /** @@ -377,7 +378,7 @@ public abstract class Calendar implements Serializable, Cloneable private static ResourceBundle getBundle(Locale locale) { return ResourceBundle.getBundle(bundleName, locale, - Calendar.class.getClassLoader()); + ClassLoader.getSystemClassLoader()); } /** diff --git a/libjava/java/util/Currency.java b/libjava/java/util/Currency.java index 472351281fc..d7987b94206 100644 --- a/libjava/java/util/Currency.java +++ b/libjava/java/util/Currency.java @@ -55,7 +55,7 @@ public final class Currency implements Serializable { this.locale = loc; this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", - locale, Currency.class.getClassLoader()); + locale, ClassLoader.getSystemClassLoader()); } /** diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java index 9de433389bd..fcef6bb4560 100644 --- a/libjava/java/util/GregorianCalendar.java +++ b/libjava/java/util/GregorianCalendar.java @@ -91,7 +91,7 @@ public class GregorianCalendar extends Calendar private static ResourceBundle getBundle(Locale locale) { return ResourceBundle.getBundle(bundleName, locale, - GregorianCalendar.class.getClassLoader()); + ClassLoader.getSystemClassLoader()); } /** -- 2.30.2