Another fix
This commit is contained in:
parent
17337e39ba
commit
02f9d4fcb7
1 changed files with 1 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ public class DeviceTraitFactory {
|
||||||
|
|
||||||
public static DeviceTrait[] getTraits(HalAbstractDevice device) {
|
public static DeviceTrait[] getTraits(HalAbstractDevice device) {
|
||||||
if (device == null || device.getDeviceData() == null)
|
if (device == null || device.getDeviceData() == null)
|
||||||
return null;
|
return new DeviceTrait[0];
|
||||||
|
|
||||||
switch (device.getDeviceData().getClass().getName()) {
|
switch (device.getDeviceData().getClass().getName()) {
|
||||||
case "se.hal.struct.devicedata.DimmerEventData":
|
case "se.hal.struct.devicedata.DimmerEventData":
|
||||||
|
|
@ -64,9 +64,6 @@ public class DeviceTraitFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> getTraitIds(DeviceTrait[] traits) {
|
public static List<String> getTraitIds(DeviceTrait[] traits) {
|
||||||
if (traits == null)
|
|
||||||
return Collections.emptyList();
|
|
||||||
|
|
||||||
List<String> list = new ArrayList<>(traits.length);
|
List<String> list = new ArrayList<>(traits.length);
|
||||||
|
|
||||||
for (DeviceTrait trait : traits) {
|
for (DeviceTrait trait : traits) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue