Commit 5257260c by Bryce McKinlay Committed by Bryce McKinlay

ResourceBundle.java (BundleKey): Don't implement Cloneable.

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
parent 227a39fa
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> 2004-11-25 Kelley Cook <kcook@gcc.gnu.org>
* configure: Regenerate for libtool reversion. * configure: Regenerate for libtool reversion.
......
...@@ -244,7 +244,7 @@ public abstract class ResourceBundle ...@@ -244,7 +244,7 @@ public abstract class ResourceBundle
/** Cache key for the ResourceBundle cache. Resource bundles are keyed /** Cache key for the ResourceBundle cache. Resource bundles are keyed
by the combination of bundle name, locale, and class loader. */ by the combination of bundle name, locale, and class loader. */
private static class BundleKey implements Cloneable private static class BundleKey
{ {
String baseName; String baseName;
Locale locale; Locale locale;
...@@ -282,18 +282,6 @@ public abstract class ResourceBundle ...@@ -282,18 +282,6 @@ public abstract class ResourceBundle
locale.equals(key.locale) && locale.equals(key.locale) &&
classLoader.equals(key.classLoader); classLoader.equals(key.classLoader);
} }
public Object clone()
{
Object clone = null;
try
{
clone = super.clone();
}
catch (CloneNotSupportedException x) {}
return clone;
}
} }
/** A cache lookup key. This avoids having to a new one for every /** A cache lookup key. This avoids having to a new one for every
...@@ -417,7 +405,7 @@ public abstract class ResourceBundle ...@@ -417,7 +405,7 @@ public abstract class ResourceBundle
if (bundle == null && !locale.equals(defaultLocale)) if (bundle == null && !locale.equals(defaultLocale))
bundle = tryBundle(baseName, defaultLocale, classLoader, true); bundle = tryBundle(baseName, defaultLocale, classLoader, true);
BundleKey key = (BundleKey) lookupKey.clone(); BundleKey key = new BundleKey(baseName, locale, classLoader);
if (bundle == null) if (bundle == null)
{ {
// Cache the fact that this lookup has previously failed. // Cache the fact that this lookup has previously failed.
......
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