mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Merge pull request #1121 from gaudryc/master
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() {
|
public String getBody() {
|
||||||
String theBody = "";
|
String theBody = "";
|
||||||
|
|
||||||
if(level != null && level != "") {
|
if(level != null && !"".equals(level)) {
|
||||||
theBody = "{\"level\":" + level + "}";
|
theBody = "{\"level\":" + level + "}";
|
||||||
}
|
}
|
||||||
else if(color != null && color != "") {
|
else if(color != null && !"".equals(color)) {
|
||||||
theBody = "{\"color\":\"" + color + "\"}";
|
theBody = "{\"color\":\"" + color + "\"}";
|
||||||
} else {
|
} else {
|
||||||
theBody = "{\"on\":" + on + "}";
|
theBody = "{\"on\":" + on + "}";
|
||||||
|
|||||||
Reference in New Issue
Block a user