hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
153 stars 82 forks source link

Fix NPE in HoldPositionCharacteristic and null value in serialized characteristics #10

Closed gry79 closed 8 years ago

gry79 commented 8 years ago

I came up with 2 bugs when trying to implement a WindowCovering.

  1. Got a null pointer exception in HoldPositionCharacteristic because getValue() returned null but should return a CompletableFuture.
  2. After fixing that the created json looked like "value": null. Looks like HomeKit cannot handle null values. Completely omitting the value fixed the problem.

By the way: Nice work your HAP-Java :-)

andylintner commented 8 years ago

Thanks @gry79 !