Fixed casting issue
This commit is contained in:
parent
f5f3730281
commit
1cbb44f714
1 changed files with 2 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ public class SmartHomeImpl extends SmartHomeApp implements TokenRegistrationList
|
||||||
throw new IllegalArgumentException("Device Type and ID was no supplied in customData: " + deviceRequest.getId());
|
throw new IllegalArgumentException("Device Type and ID was no supplied in customData: " + deviceRequest.getId());
|
||||||
|
|
||||||
String deviceTypeStr = (String) deviceRequest.getCustomData().get("type");
|
String deviceTypeStr = (String) deviceRequest.getCustomData().get("type");
|
||||||
long deviceId = Long.parseLong((String) deviceRequest.getCustomData().get("id"));
|
long deviceId = (Long) deviceRequest.getCustomData().get("id");
|
||||||
|
|
||||||
HalAbstractDevice device;
|
HalAbstractDevice device;
|
||||||
switch (deviceTypeStr) {
|
switch (deviceTypeStr) {
|
||||||
|
|
@ -241,7 +241,7 @@ public class SmartHomeImpl extends SmartHomeApp implements TokenRegistrationList
|
||||||
throw new IllegalArgumentException("Device Type and ID was no supplied in customData: " + deviceRequest.getId());
|
throw new IllegalArgumentException("Device Type and ID was no supplied in customData: " + deviceRequest.getId());
|
||||||
|
|
||||||
String deviceTypeStr = (String) deviceRequest.getCustomData().get("type");
|
String deviceTypeStr = (String) deviceRequest.getCustomData().get("type");
|
||||||
long deviceId = Long.parseLong((String) deviceRequest.getCustomData().get("id"));
|
long deviceId = (Long) deviceRequest.getCustomData().get("id");
|
||||||
|
|
||||||
HalAbstractDevice device;
|
HalAbstractDevice device;
|
||||||
switch (deviceTypeStr) {
|
switch (deviceTypeStr) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue