@@ -261,6 +261,7 @@ private CloudModel bindDevicesToGateway(String registryId, String gatewayId,
261
261
262
262
private void checkBoundState (String registryId , String gatewayId , Set <String > deviceIds ,
263
263
Consumer <String > progress ) {
264
+ requireNonNull (progress , "checkBoundState has null progress" );
264
265
CloudModel cloudModel = listRegistryDevices (registryId , gatewayId , progress );
265
266
List <String > proxyIds = cloudModel .gateway .proxy_ids ;
266
267
progress .accept (format ("Found %d devices bound to gateway %s." , proxyIds .size (), gatewayId ));
@@ -422,6 +423,7 @@ private HashMap<String, CloudModel> fetchDevices(String deviceRegistryId, String
422
423
423
424
private HashMap <String , CloudModel > fetchDevices (String deviceRegistryId ,
424
425
Consumer <String > progress , GatewayListOptions gatewayListOptions ) {
426
+ requireNonNull (progress , "fetchDevices has null progress" );
425
427
String location = getRegistryLocation (deviceRegistryId );
426
428
String registryFullName =
427
429
RegistryName .of (projectId , location , deviceRegistryId ).getRegistryFullName ();
@@ -553,6 +555,7 @@ private CloudModel listRegistryDevices(String registryId, String gatewayId,
553
555
554
556
private Map <String , CloudModel > augmentGatewayModels (String registryId ,
555
557
HashMap <String , CloudModel > boundDevices , Consumer <String > progress ) {
558
+ requireNonNull (progress , "augmentGatewayModels has null progress" );
556
559
HashMap <String , String > proxyDeviceGateways = new HashMap <>();
557
560
Set <Entry <String , CloudModel >> gateways =
558
561
boundDevices .entrySet ().stream ().filter (this ::isGateway ).collect (Collectors .toSet ());
@@ -741,6 +744,7 @@ private CloudModel unbindAndDeleteCore(String registryId, Device device, Set<Str
741
744
742
745
private void bindDevicesGateways (String registryId , Set <String > gatewayIds ,
743
746
Set <String > deviceIds , boolean toBind , Consumer <String > progress ) {
747
+ requireNonNull (progress , "bindDevicesGateways has null progress" );
744
748
String opCode = toBind ? "Binding" : "Unbinding" ;
745
749
info ("%s %s: gateways %s devices %s" , opCode , registryId , gatewayIds , deviceIds );
746
750
AtomicInteger opCount = new AtomicInteger (0 );
0 commit comments