Commit 284d6a1f by Bryce McKinlay Committed by Bryce McKinlay

Calendar.java: Use getSystemClassLoader as argument for ResourceBundle.getBundle() calls.

2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>

	* 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
parent 020510c9
2004-07-09 Bryce McKinlay <mckinlay@redhat.com> 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
* 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 <mckinlay@redhat.com>
* java/util/ResourceBundle.java (bundleCache): Renamed from * java/util/ResourceBundle.java (bundleCache): Renamed from
resourceBundleCache. Update comments. resourceBundleCache. Update comments.
(getObject): Don't catch MissingResourceException. (getObject): Don't catch MissingResourceException.
......
...@@ -704,7 +704,7 @@ public class Window extends Container implements Accessible ...@@ -704,7 +704,7 @@ public class Window extends Container implements Accessible
public void applyResourceBundle(String rbName) public void applyResourceBundle(String rbName)
{ {
ResourceBundle rb = ResourceBundle.getBundle(rbName, Locale.getDefault(), ResourceBundle rb = ResourceBundle.getBundle(rbName, Locale.getDefault(),
Window.class.getClassLoader()); ClassLoader.getSystemClassLoader());
if (rb != null) if (rb != null)
applyResourceBundle(rb); applyResourceBundle(rb);
} }
......
...@@ -136,7 +136,7 @@ public abstract class BreakIterator implements Cloneable ...@@ -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, BreakIterator.class.getClassLoader()); loc, ClassLoader.getSystemClassLoader());
className = res.getString(type); className = res.getString(type);
} }
catch (MissingResourceException x) catch (MissingResourceException x)
......
...@@ -303,7 +303,7 @@ public abstract class Collator implements Comparator, Cloneable ...@@ -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, Collator.class.getClassLoader()); loc, ClassLoader.getSystemClassLoader());
pattern = res.getString("collation_rules"); pattern = res.getString("collation_rules");
} }
catch (MissingResourceException x) catch (MissingResourceException x)
......
...@@ -326,7 +326,7 @@ public abstract class DateFormat extends Format implements Cloneable ...@@ -326,7 +326,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, DateFormat.class.getClassLoader()); loc, ClassLoader.getSystemClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {
......
...@@ -99,7 +99,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable ...@@ -99,7 +99,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
{ {
ResourceBundle res ResourceBundle res
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale, = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
getClass().getClassLoader()); ClassLoader.getSystemClassLoader());
ampms = res.getStringArray ("ampms"); ampms = res.getStringArray ("ampms");
eras = res.getStringArray ("eras"); eras = res.getStringArray ("eras");
......
...@@ -130,7 +130,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable ...@@ -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, DecimalFormatSymbols.class.getClassLoader()); loc, ClassLoader.getSystemClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {
......
...@@ -310,7 +310,7 @@ public abstract class NumberFormat extends Format implements Cloneable ...@@ -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, NumberFormat.class.getClassLoader()); loc, ClassLoader.getSystemClassLoader());
} }
catch (MissingResourceException x) catch (MissingResourceException x)
{ {
......
...@@ -42,6 +42,7 @@ import java.io.IOException; ...@@ -42,6 +42,7 @@ import java.io.IOException;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
/** /**
...@@ -377,7 +378,7 @@ public abstract class Calendar implements Serializable, Cloneable ...@@ -377,7 +378,7 @@ 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()); ClassLoader.getSystemClassLoader());
} }
/** /**
......
...@@ -55,7 +55,7 @@ public final class Currency implements Serializable ...@@ -55,7 +55,7 @@ public final class Currency implements Serializable
{ {
this.locale = loc; this.locale = loc;
this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation",
locale, Currency.class.getClassLoader()); locale, ClassLoader.getSystemClassLoader());
} }
/** /**
......
...@@ -91,7 +91,7 @@ public class GregorianCalendar extends Calendar ...@@ -91,7 +91,7 @@ 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()); ClassLoader.getSystemClassLoader());
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment