final int cd = connectedDevices(); if (deviceId >= cd || deviceId < 0) { throw new IllegalArgumentException("Invalid device id");
final int cd = connectedDevices(); if (deviceId >= cd || deviceId < 0) { throw new IllegalArgumentException("Invalid device id");