From 81be4e3aac55305cbb5c9d523cf5c96c66604b39 Mon Sep 17 00:00:00 2001 From: Paul Stewart Date: Mon, 21 Mar 2016 09:51:27 -0700 Subject: Fix string equality comparison Don't use "==" to compare strings. Bug: 25624963 Change-Id: Id25696e4fdcbcf4d48ec74e8ed65c1a33716b30c --- wifi/java/android/net/wifi/WifiEnterpriseConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wifi') diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java index 16035ad..a337755 100644 --- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java +++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java @@ -769,7 +769,7 @@ public class WifiEnterpriseConfig implements Parcelable { StringBuffer sb = new StringBuffer(); for (String key : mFields.keySet()) { // Don't display password in toString(). - String value = (key == PASSWORD_KEY) ? "" : mFields.get(key); + String value = PASSWORD_KEY.equals(key) ? "" : mFields.get(key); sb.append(key).append(" ").append(value).append("\n"); } return sb.toString(); -- cgit v1.1