mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 16:17:27 +08: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:
parent
ae5570023f
commit
a828c3e105
@ -1,3 +1,8 @@
|
||||
2002-11-27 Julian Dolby <dolby@us.ibm.com>
|
||||
|
||||
* java/util/Locale.java (toString): Improve efficiency if country
|
||||
and variant are both empty.
|
||||
|
||||
2002-11-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify.cc (pop_init_ref): New method.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user