Skip to content

Commit f20e309

Browse files
authored
Added NPE Precondition (#1417)
fixes #1416 Signed-off-by: Amit Kumar Mondal <[email protected]>
1 parent 1356681 commit f20e309

File tree

1 file changed

+3
-0
lines changed
  • com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember

1 file changed

+3
-0
lines changed

com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberNcp.java

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88
package com.zsmartsystems.zigbee.dongle.ember;
99

10+
import static java.util.Objects.requireNonNull;
11+
1012
import java.util.ArrayList;
1113
import java.util.Arrays;
1214
import java.util.Collection;
@@ -192,6 +194,7 @@ public class EmberNcp {
192194
* @param protocolHandler the {@link EzspFrameHandler} used for communicating with the NCP
193195
*/
194196
public EmberNcp(EzspProtocolHandler protocolHandler) {
197+
requireNonNull(protocolHandler, "Protocol handler cannot be null");
195198
this.protocolHandler = protocolHandler;
196199
}
197200

0 commit comments

Comments
 (0)