This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Patch: java.util.Locale
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: 15 Mar 2004 12:13:51 -0700
- Subject: Re: FYI: Patch: java.util.Locale
- References: <200403111728.06789.konqueror@gmx.de>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:
Michael> I just commited the attached patch to trunk to fix some string
Michael> comparison issues.
Michael> 2004-03-11 Michael Koch <konqueror@gmx.de>
Michael> * java/util/Locale.java
Michael> (getISO3Language): Use String.equals() instead of ==.
Michael> (getISO3Country): Likewise.
The code in Locale uses `==' for performance. I think way back
Anthony had some data supporting this. He patched Locale to intern()
its strings, making the optimization valid.
So, I suspect we should revert this patch and instead add comments at
the affected places indicating why this is ok. Anthony, do you have
anything to add here?
Tom