We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e64bf79 + e55aeef commit 50d0a4dCopy full SHA for 50d0a4d
src/main/java/com/beowulfe/hap/characteristics/BaseCharacteristic.java
@@ -68,7 +68,14 @@ public final CompletableFuture<JsonObject> toJson(int iid) {
68
* @return a future that will complete with the JSON builder for the object.
69
*/
70
protected CompletableFuture<JsonObjectBuilder> makeBuilder(int instanceId) {
71
- return getValue().exceptionally(t -> {
+ CompletableFuture<T> futureValue = getValue();
72
+
73
+ if (futureValue == null) {
74
+ logger.error("Could not retrieve value "+this.getClass().getName());
75
+ return null;
76
+ }
77
78
+ return futureValue.exceptionally(t -> {
79
logger.error("Could not retrieve value "+this.getClass().getName(), t);
80
return null;
81
}).thenApply(value -> {
0 commit comments