summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorJeroen Frijters <jeroen@sumatra.nl>2007-11-08 15:19:37 +0000
committerJeroen Frijters <jeroen@sumatra.nl>2007-11-08 15:19:37 +0000
commit995ad9db2e3391c242f92f8016ac48452fab3407 (patch)
tree6f3864351ea0b8349a045457a0ef38866e68fdce /java
parentf4dbe7089736fdd7366bd05a605837dd64503277 (diff)
downloadclasspath-995ad9db2e3391c242f92f8016ac48452fab3407.tar.gz
2007-11-08 Jeroen Frijters <jeroen@frijters.net>
* java/util/Locale.java (Locale): Always intern strings.
Diffstat (limited to 'java')
-rw-r--r--java/util/Locale.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/util/Locale.java b/java/util/Locale.java
index 846ae7baa..31973e485 100644
--- a/java/util/Locale.java
+++ b/java/util/Locale.java
@@ -324,13 +324,12 @@ public final class Locale implements Serializable, Cloneable
// default locale.
if (defaultLocale != null)
{
- language = convertLanguage(language).intern();
- country = country.toUpperCase().intern();
- variant = variant.intern();
+ language = convertLanguage(language);
+ country = country.toUpperCase();
}
- this.language = language;
- this.country = country;
- this.variant = variant;
+ this.language = language.intern();
+ this.country = country.intern();
+ this.variant = variant.intern();
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
}