From 1b42f08a013d962cfebb197592a36d493df803dc Mon Sep 17 00:00:00 2001 From: charitha Date: Thu, 21 Jul 2016 17:50:11 +0530 Subject: [PATCH] Fix issues in PR https://github.com/wso2/product-iots/pull/151 --- .../org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java b/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java index effaf602..516ac9c2 100644 --- a/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java +++ b/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java @@ -129,7 +129,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService { } String sensorState = state.toUpperCase(); if (!DeviceTypeConstants.STATE_ON.equals(sensorState) - && !sensorState.equals(DeviceTypeConstants.STATE_OFF)) { + && !DeviceTypeConstants.STATE_OFF.equals(sensorState)) { log.error("The requested state change should be either - 'ON' or 'OFF'"); return Response.status(Response.Status.BAD_REQUEST).build(); }