diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2004-07-05 22:33:24 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2004-07-05 23:33:24 +0100 |
commit | a86f03720b3e13269d3e1f1853df4239ef0ffef1 (patch) | |
tree | bbfcd116b53a2cbfc372d791a0a52f5c75cee3d0 /libjava/java/util/Locale.java | |
parent | dcbaa800c3e9789c649c21c02f16faab79116dfc (diff) | |
download | gcc-a86f03720b3e13269d3e1f1853df4239ef0ffef1.zip gcc-a86f03720b3e13269d3e1f1853df4239ef0ffef1.tar.gz gcc-a86f03720b3e13269d3e1f1853df4239ef0ffef1.tar.bz2 |
Locale.java (readObject): Intern strings read from object stream.
2004-07-05 Bryce McKinlay <mckinlay@redhat.com>
* java/util/Locale.java (readObject): Intern strings read from
object stream.
From-SVN: r84137
Diffstat (limited to 'libjava/java/util/Locale.java')
-rw-r--r-- | libjava/java/util/Locale.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/util/Locale.java b/libjava/java/util/Locale.java index ca6334c..4e88839 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(); } |