java.lang.NullPointerException: null
at com.zsmartsystems.zigbee.zcl.ZclCluster.readAttributeValue(readAttributeValue:480)
at com.zsmartsystems.zigbee.zcl.ZclAttribute.readValue(readValue:193)
at com.zsmartsystems.zigbee.app.iasclient.ZclIasZoneClient.initialise(initialise:220)
at com.zsmartsystems.zigbee.app.iasclient.ZclIasZoneClient.appStartup(appStartup:192)
at com.zsmartsystems.zigbee.ZigBeeEndpoint.addApplication(addApplication:413)
at com.zsmartsystems.zigbee.app.iasclient.ZigBeeIasCieExtension.nodeAdded(nodeAdded:55)
at com.zsmartsystems.zigbee.ZigBeeNetworkManager$7.run(run:1380)
at java.util.concurrent.ThreadPoolExecutor.runWorker(runWorker:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(run:624)
at java.lang.Thread.run(run:748)
The Exception is thrown by this statement: result = readAttribute(attributeId).get();readAttribute returns a Future and apparently it is null in that case. Starting from readAttribute I followed the invocations and in ZigBeeTransactionManager.queueTransaction(...) I saw this statement
if (isShutdown) {
logger.debug("Transaction Manager is shutdown. Transaction not sent: {}", transaction);
return null;
}
Since returning a null value is intended, I suggest to null-check the Future in ZclCluster.readAttributeValue. I will open a PR for this.
Sometimes this Exception is thrown:
The Exception is thrown by this statement:
result = readAttribute(attributeId).get();
readAttribute
returns aFuture
and apparently it is null in that case. Starting fromreadAttribute
I followed the invocations and inZigBeeTransactionManager.queueTransaction(...)
I saw this statementSince returning a null value is intended, I suggest to null-check the Future in
ZclCluster.readAttributeValue
. I will open a PR for this.