2004-11-25 Bryce McKinlay <mckinlay@redhat.com>
* java/util/ResourceBundle.java (BundleKey): Don't implement
Cloneable.
(BundleKey.clone): Removed.
(getBundle): Copy BundleKey using constructor, not clone().
From-SVN: r91304
+2004-11-25 Bryce McKinlay <mckinlay@redhat.com>
+
+ * java/util/ResourceBundle.java (BundleKey): Don't implement
+ Cloneable.
+ (BundleKey.clone): Removed.
+ (getBundle): Copy BundleKey using constructor, not clone().
+
2004-11-25 Kelley Cook <kcook@gcc.gnu.org>
* configure: Regenerate for libtool reversion.
2004-11-25 Kelley Cook <kcook@gcc.gnu.org>
* configure: Regenerate for libtool reversion.
/** Cache key for the ResourceBundle cache. Resource bundles are keyed
by the combination of bundle name, locale, and class loader. */
/** Cache key for the ResourceBundle cache. Resource bundles are keyed
by the combination of bundle name, locale, and class loader. */
- private static class BundleKey implements Cloneable
+ private static class BundleKey
{
String baseName;
Locale locale;
{
String baseName;
Locale locale;
baseName.equals(key.baseName) &&
locale.equals(key.locale) &&
classLoader.equals(key.classLoader);
baseName.equals(key.baseName) &&
locale.equals(key.locale) &&
classLoader.equals(key.classLoader);
- }
-
- public Object clone()
- {
- Object clone = null;
- try
- {
- clone = super.clone();
- }
- catch (CloneNotSupportedException x) {}
-
- return clone;
if (bundle == null && !locale.equals(defaultLocale))
bundle = tryBundle(baseName, defaultLocale, classLoader, true);
if (bundle == null && !locale.equals(defaultLocale))
bundle = tryBundle(baseName, defaultLocale, classLoader, true);
- BundleKey key = (BundleKey) lookupKey.clone();
+ BundleKey key = new BundleKey(baseName, locale, classLoader);
if (bundle == null)
{
// Cache the fact that this lookup has previously failed.
if (bundle == null)
{
// Cache the fact that this lookup has previously failed.