Skip to content

Commit

Permalink
Added NPE Precondition (#1417)
Browse files Browse the repository at this point in the history
fixes #1416
Signed-off-by: Amit Kumar Mondal <[email protected]>
  • Loading branch information
amitjoy authored Feb 19, 2024
1 parent 1356681 commit f20e309
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*/
package com.zsmartsystems.zigbee.dongle.ember;

import static java.util.Objects.requireNonNull;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -192,6 +194,7 @@ public class EmberNcp {
* @param protocolHandler the {@link EzspFrameHandler} used for communicating with the NCP
*/
public EmberNcp(EzspProtocolHandler protocolHandler) {
requireNonNull(protocolHandler, "Protocol handler cannot be null");
this.protocolHandler = protocolHandler;
}

Expand Down

0 comments on commit f20e309

Please sign in to comment.