This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Patch: java.util.Locale


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]