diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2004-11-25 19:20:17 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2004-11-25 19:20:17 +0000 |
commit | 5257260c2bac40d3691c6054520d52aced302b65 (patch) | |
tree | 731149e7c673306a241a86e479c280bdf493451c /libjava | |
parent | 227a39fa4227f67b1dfcbe2e19a9ac0d096b616f (diff) | |
download | gcc-5257260c2bac40d3691c6054520d52aced302b65.zip gcc-5257260c2bac40d3691c6054520d52aced302b65.tar.gz gcc-5257260c2bac40d3691c6054520d52aced302b65.tar.bz2 |
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
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 7 | ||||
-rw-r--r-- | libjava/java/util/ResourceBundle.java | 16 |
2 files changed, 9 insertions, 14 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1de7a72..1f26c2b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/java/util/ResourceBundle.java b/libjava/java/util/ResourceBundle.java index 94acc96..57a9bfc 100644 --- a/libjava/java/util/ResourceBundle.java +++ b/libjava/java/util/ResourceBundle.java @@ -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. |