Source:
<code>public BigtableOptions build() { if (options.bulkOptions.getMaxInflightRpcs() <= 0) { <START> int maxInflightRpcs = <END> BulkOptions.BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT * options.dataChannelCount; options.bulkOptions = options.bulkOptions.toBuilder().setMaxInflightRpcs(maxInflightRpcs).build(); } applyEmulatorEnvironment(); options.adminHost = Preconditions.checkNotNull(options.adminHost); options.dataHost = Preconditions.checkNotNull(options.dataHost); if (!Strings.isNullOrEmpty(options.projectId) && !Strings.isNullOrEmpty(options.instanceId)) { options.instanceName = new BigtableInstanceName(options.projectId, options.instanceId); } else { options.instanceName = null; } if (options.useBatch) { options.useCachedDataPool = true; if (options.dataHost.equals(BIGTABLE_DATA_HOST_DEFAULT)) { options.dataHost = BIGTABLE_BATCH_DATA_HOST_DEFAULT; } RetryOptions.Builder retryOptionsBuilder = options.retryOptions.toBuilder(); if (options.retryOptions.getInitialBackoffMillis() == RetryOptions.DEFAULT_INITIAL_BACKOFF_MILLIS) { retryOptionsBuilder.setInitialBackoffMillis((int) TimeUnit.SECONDS.toMillis(5)); } if (options.retryOptions.getMaxElapsedBackoffMillis() == RetryOptions.DEFAULT_MAX_ELAPSED_BACKOFF_MILLIS) { retryOptionsBuilder.setMaxElapsedBackoffMillis((int) TimeUnit.MINUTES.toMillis(5)); } options.retryOptions = retryOptionsBuilder.build(); } LOG.debug( "Connection Configuration: projectId: %s, instanceId: %s, data host %s, " + "admin host %s.", options.projectId, options.instanceId, options.dataHost, options.adminHost); return options; }</code><technical_language>add a check for null throw if is set</technical_language>

Target:
public BigtableOptions build() { Preconditions.checkNotNull(options.bulkOptions, "bulk options cannot be null"); if (options.bulkOptions.getMaxInflightRpcs() <= 0) { int maxInflightRpcs = BulkOptions.BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT * options.dataChannelCount; options.bulkOptions = options.bulkOptions.toBuilder().setMaxInflightRpcs(maxInflightRpcs).build(); } applyEmulatorEnvironment(); options.adminHost = Preconditions.checkNotNull(options.adminHost); options.dataHost = Preconditions.checkNotNull(options.dataHost); if (!Strings.isNullOrEmpty(options.projectId) && !Strings.isNullOrEmpty(options.instanceId)) { options.instanceName = new BigtableInstanceName(options.projectId, options.instanceId); } else { options.instanceName = null; } if (options.useBatch) { options.useCachedDataPool = true; if (options.dataHost.equals(BIGTABLE_DATA_HOST_DEFAULT)) { options.dataHost = BIGTABLE_BATCH_DATA_HOST_DEFAULT; } RetryOptions.Builder retryOptionsBuilder = options.retryOptions.toBuilder(); if (options.retryOptions.getInitialBackoffMillis() == RetryOptions.DEFAULT_INITIAL_BACKOFF_MILLIS) { retryOptionsBuilder.setInitialBackoffMillis((int) TimeUnit.SECONDS.toMillis(5)); } if (options.retryOptions.getMaxElapsedBackoffMillis() == RetryOptions.DEFAULT_MAX_ELAPSED_BACKOFF_MILLIS) { retryOptionsBuilder.setMaxElapsedBackoffMillis((int) TimeUnit.MINUTES.toMillis(5)); } options.retryOptions = retryOptionsBuilder.build(); } LOG.debug( "Connection Configuration: projectId: %s, instanceId: %s, data host %s, " + "admin host %s.", options.projectId, options.instanceId, options.dataHost, options.adminHost); return options; }