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
This commit is contained in:
Bryce McKinlay 2004-06-14 15:51:37 +00:00 committed by Bryce McKinlay
parent fc9c8ce15a
commit 84b1d82150
11 changed files with 32 additions and 11 deletions

View 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> 2004-06-14 Andrew Haley <aph@redhat.com>
* java/lang/System.java: (getenv0): New method. * java/lang/System.java: (getenv0): New method.

View file

@ -703,7 +703,8 @@ public class Window extends Container implements Accessible
*/ */
public void applyResourceBundle(String rbName) public void applyResourceBundle(String rbName)
{ {
ResourceBundle rb = ResourceBundle.getBundle(rbName); ResourceBundle rb = ResourceBundle.getBundle(rbName, Locale.getDefault(),
Window.class.getClassLoader());
if (rb != null) if (rb != null)
applyResourceBundle(rb); applyResourceBundle(rb);
} }

View file

@ -136,7 +136,7 @@ public abstract class BreakIterator implements Cloneable
{ {
ResourceBundle res ResourceBundle res
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc); loc, BreakIterator.class.getClassLoader());
className = res.getString(type); className = res.getString(type);
} }
catch (MissingResourceException x) catch (MissingResourceException x)

View file

@ -303,7 +303,7 @@ public abstract class Collator implements Comparator, Cloneable
try try
{ {
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc); loc, Collator.class.getClassLoader());
pattern = res.getString("collation_rules"); pattern = res.getString("collation_rules");
} }
catch (MissingResourceException x) catch (MissingResourceException x)

View file

@ -325,7 +325,7 @@ public abstract class DateFormat extends Format implements Cloneable
try try
{ {
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc); loc, DateFormat.class.getClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {

View file

@ -98,7 +98,8 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
public DateFormatSymbols (Locale locale) throws MissingResourceException public DateFormatSymbols (Locale locale) throws MissingResourceException
{ {
ResourceBundle res ResourceBundle res
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale); = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
getClass().getClassLoader());
ampms = res.getStringArray ("ampms"); ampms = res.getStringArray ("ampms");
eras = res.getStringArray ("eras"); eras = res.getStringArray ("eras");

View file

@ -130,7 +130,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
try try
{ {
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc); loc, DecimalFormatSymbols.class.getClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {

View file

@ -310,7 +310,7 @@ public abstract class NumberFormat extends Format implements Cloneable
try try
{ {
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc); loc, NumberFormat.class.getClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {

View file

@ -376,7 +376,8 @@ public abstract class Calendar implements Serializable, Cloneable
*/ */
private static ResourceBundle getBundle(Locale locale) private static ResourceBundle getBundle(Locale locale)
{ {
return ResourceBundle.getBundle(bundleName, locale); return ResourceBundle.getBundle(bundleName, locale,
Calendar.class.getClassLoader());
} }
/** /**

View file

@ -54,7 +54,8 @@ public final class Currency implements Serializable
private Currency (Locale loc) private Currency (Locale loc)
{ {
this.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 // First we need to implement fully LocaleInformation*.java
try 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)) if (res.equals(this.res))
return res.getString ("currencySymbol"); return res.getString ("currencySymbol");

View file

@ -90,7 +90,8 @@ public class GregorianCalendar extends Calendar
*/ */
private static ResourceBundle getBundle(Locale locale) private static ResourceBundle getBundle(Locale locale)
{ {
return ResourceBundle.getBundle(bundleName, locale); return ResourceBundle.getBundle(bundleName, locale,
GregorianCalendar.class.getClassLoader());
} }
/** /**