Commit a86f0372 by Bryce McKinlay Committed by Bryce McKinlay

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
parent dcbaa800
2004-07-05 Bryce McKinlay <mckinlay@redhat.com>
* java/util/Locale.java (readObject): Intern strings read from object
stream.
2004-07-04 Michael Koch <konqueror@gmx.de> 2004-07-04 Michael Koch <konqueror@gmx.de>
* gnu/gcj/runtime/FirstThread.java, * gnu/gcj/runtime/FirstThread.java,
......
...@@ -765,9 +765,9 @@ public final class Locale implements Serializable, Cloneable ...@@ -765,9 +765,9 @@ public final class Locale implements Serializable, Cloneable
private void readObject(ObjectInputStream s) private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException throws IOException, ClassNotFoundException
{ {
language = (String) s.readObject(); language = ((String) s.readObject()).intern();
country = (String) s.readObject(); country = ((String) s.readObject()).intern();
variant = (String) s.readObject(); variant = ((String) s.readObject()).intern();
// Recompute hashcode. // Recompute hashcode.
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode(); hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment