application-manager-new
charitha 8 years ago
parent 35a47f81b0
commit 1b42f08a01

@ -129,7 +129,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService {
} }
String sensorState = state.toUpperCase(); String sensorState = state.toUpperCase();
if (!DeviceTypeConstants.STATE_ON.equals(sensorState) 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'"); log.error("The requested state change should be either - 'ON' or 'OFF'");
return Response.status(Response.Status.BAD_REQUEST).build(); return Response.status(Response.Status.BAD_REQUEST).build();
} }

Loading…
Cancel
Save