Merge pull request #1121 from gaudryc/master

Fix the bad practice "Comparison of String objects using == or !=".
This commit is contained in:
BWS Systems
2019-08-19 08:08:19 -05:00
committed by GitHub

View File

@@ -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 + "}";