summaryrefslogtreecommitdiff
path: root/libjava/java/util/Locale.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/Locale.java')
-rw-r--r--libjava/java/util/Locale.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/util/Locale.java b/libjava/java/util/Locale.java
index ca6334cb334..4e8883994ed 100644
--- a/libjava/java/util/Locale.java
+++ b/libjava/java/util/Locale.java
@@ -765,9 +765,9 @@ public final class Locale implements Serializable, Cloneable
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
- language = (String) s.readObject();
- country = (String) s.readObject();
- variant = (String) s.readObject();
+ language = ((String) s.readObject()).intern();
+ country = ((String) s.readObject()).intern();
+ variant = ((String) s.readObject()).intern();
// Recompute hashcode.
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
}