review comment fix

This commit is contained in:
Jonathan Shook 2025-01-03 15:09:07 -06:00
parent 9a6a881ceb
commit 1a61846ea0

View File

@ -2,13 +2,13 @@ package io.nosqlbench.engine.api.activityimpl.uniform;
/*
* Copyright (c) nosqlbench
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -42,14 +42,11 @@ public class AdapterResolver
NBConfiguration configSuperset
)
{
ServiceSelector<DriverAdapterLoader>
loader =
ServiceSelector.of(name, ServiceLoader.load(DriverAdapterLoader.class));
DriverAdapterLoader
dal =
loader.get()
.orElseThrow(() -> new OpConfigError("No DriverAdapterLoader found for " + name));
DriverAdapter<CycleOp<?>, Space> adapter = dal.load(parent, NBLabels.forKV());
ServiceSelector<DriverAdapterLoader> selector = ServiceSelector.of(
name, ServiceLoader.load(DriverAdapterLoader.class));
DriverAdapterLoader loader = selector.get()
.orElseThrow(() -> new OpConfigError("No DriverAdapterLoader found for " + name));
DriverAdapter<CycleOp<?>, Space> adapter = loader.load(parent, NBLabels.forKV());
if (adapter instanceof NBConfigurable configurable) {
NBConfigModel adapterModel = configurable.getConfigModel();