mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
Locale.java (toString): Improve efficiency if country and variant are both empty.
2002-11-27 Julian Dolby <dolby@us.ibm.com> * java/util/Locale.java (toString): Improve efficiency if country and variant are both empty. From-SVN: r59590
This commit is contained in:
@@ -420,6 +420,8 @@ public final class Locale implements Serializable, Cloneable
|
||||
{
|
||||
if (language.length() == 0 && country.length() == 0)
|
||||
return "";
|
||||
else if (country.length() == 0 && variant.length() == 0)
|
||||
return language;
|
||||
StringBuffer result = new StringBuffer(language);
|
||||
result.append('_').append(country);
|
||||
if (variant.length() != 0)
|
||||
|
||||
Reference in New Issue
Block a user