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
This commit is contained in:
parent
dcbaa800c3
commit
a86f03720b
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
* gnu/gcj/runtime/FirstThread.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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user