Skip to content

Commit e4688a0

Browse files
committed
chore: cleanup extraneous executor handling
Currently, we control the full lifecycle of the instance of StorageSettings and can ensure it will never need a backup executor service.
1 parent b426e7d commit e4688a0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageOptions.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.google.api.core.ObsoleteApi;
2828
import com.google.api.gax.core.CredentialsProvider;
2929
import com.google.api.gax.core.FixedCredentialsProvider;
30-
import com.google.api.gax.core.InstantiatingExecutorProvider;
3130
import com.google.api.gax.core.NoCredentialsProvider;
3231
import com.google.api.gax.grpc.GrpcCallSettings;
3332
import com.google.api.gax.grpc.GrpcInterceptorProvider;
@@ -821,14 +820,7 @@ public Storage create(StorageOptions options) {
821820
Opts<UserProject> defaultOpts = t.y();
822821

823822
ScheduledExecutorService executor =
824-
Utils.firstNonNull(
825-
storageSettings::getBackgroundExecutorProvider,
826-
() -> {
827-
// TODO: if we make it to here, ensure we track the need to shutdown the
828-
// executor separate from StorageClient
829-
return InstantiatingExecutorProvider.newBuilder().build();
830-
})
831-
.getExecutor();
823+
storageSettings.getBackgroundExecutorProvider().getExecutor();
832824
RetryContextProvider retryContextProvider =
833825
RetryContext.providerFrom(
834826
executor,

0 commit comments

Comments
 (0)