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
This commit is contained in:
parent
227a39fa42
commit
5257260c2b
@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
@ -244,7 +244,7 @@ public abstract class ResourceBundle
|
||||
|
||||
/** 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;
|
||||
@ -281,18 +281,6 @@ public abstract class ResourceBundle
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -417,7 +405,7 @@ public abstract class ResourceBundle
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user