aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util')
-rw-r--r--libjava/java/util/Locale.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/java/util/Locale.java b/libjava/java/util/Locale.java
index c77f0cb..cc6d65f 100644
--- a/libjava/java/util/Locale.java
+++ b/libjava/java/util/Locale.java
@@ -436,7 +436,8 @@ public final class Locale implements Serializable, Cloneable
*/
public String getISO3Language()
{
- if (language.equals(""))
+ // We know all strings are interned so we can use '==' for better performance.
+ if (language == "")
return "";
int index
= ("aa,ab,af,am,ar,as,ay,az,ba,be,bg,bh,bi,bn,bo,br,ca,co,cs,cy,da,"
@@ -472,7 +473,8 @@ public final class Locale implements Serializable, Cloneable
*/
public String getISO3Country()
{
- if (country.equals(""))
+ // We know all strings are interned so we can use '==' for better performance.
+ if (country == "")
return "";
int index
= ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF,"