device = ((SingleDeviceGroup)deviceGroup).getDevice();
} else {
long address = CommandUtil.consumeNumber(args);
device = deviceGroup.getDevice(address);
if (device == null) {
if (!deviceGroup.allowImplicitCreation()) {
throw new CommandExecutionException
(Command.ERROR_UNSUPPORTED_DEVICE);
}
device = deviceGroup.createDevice(address);
if (!(device instanceof InitializableDevice)