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
2 changed files with 7 additions and 0 deletions
|
@ -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>
|
2002-11-26 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* verify.cc (pop_init_ref): New method.
|
* 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)
|
if (language.length() == 0 && country.length() == 0)
|
||||||
return "";
|
return "";
|
||||||
|
else if (country.length() == 0 && variant.length() == 0)
|
||||||
|
return language;
|
||||||
StringBuffer result = new StringBuffer(language);
|
StringBuffer result = new StringBuffer(language);
|
||||||
result.append('_').append(country);
|
result.append('_').append(country);
|
||||||
if (variant.length() != 0)
|
if (variant.length() != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue