mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 10:14:36 +00:00
Fix the bad practice "Comparison of String objects using == or !=".
This commit is contained in:
@@ -41,10 +41,10 @@ public class MozIotCommandDetail {
|
||||
public String getBody() {
|
||||
String theBody = "";
|
||||
|
||||
if(level != null && level != "") {
|
||||
if(level != null && !"".equals(level)) {
|
||||
theBody = "{\"level\":" + level + "}";
|
||||
}
|
||||
else if(color != null && color != "") {
|
||||
else if(color != null && !"".equals(color)) {
|
||||
theBody = "{\"color\":\"" + color + "\"}";
|
||||
} else {
|
||||
theBody = "{\"on\":" + on + "}";
|
||||
|
||||
Reference in New Issue
Block a user