Skip to content

Commit

Permalink
Fix string equality comparison
Browse files Browse the repository at this point in the history
Don't use "==" to compare strings.

Bug: 25624963
Change-Id: Id25696e4fdcbcf4d48ec74e8ed65c1a33716b30c
  • Loading branch information
pstew-dd authored and andi34 committed Oct 22, 2016
1 parent ac214f5 commit dc9e10d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ public String toString() {
StringBuffer sb = new StringBuffer();
for (String key : mFields.keySet()) {
// Don't display password in toString().
String value = (key == PASSWORD_KEY) ? "<removed>" : mFields.get(key);
String value = PASSWORD_KEY.equals(key) ? "<removed>" : mFields.get(key);
sb.append(key).append(" ").append(value).append("\n");
}
return sb.toString();
Expand Down

0 comments on commit dc9e10d

Please sign in to comment.