remove driver field at the right time

This commit is contained in:
Jonathan Shook 2022-06-30 00:35:54 -05:00
parent 9cc92c8f8e
commit 95f108c6ea

View File

@ -463,6 +463,7 @@ public class SimpleActivity implements Activity, ProgressCapable {
protected <O extends Op> OpSequence<OpDispenser<? extends O>> createOpSourceFromParsedOps(
Map<String, DriverAdapter> adapterCache,
Map<String, OpMapper<Op>> mapperCache,
List<DriverAdapter> adapters,
List<ParsedOp> pops
) {
List<Long> ratios = new ArrayList<>(pops.size());
@ -484,12 +485,9 @@ public class SimpleActivity implements Activity, ProgressCapable {
for (int i = 0; i < pops.size(); i++) {
long ratio = ratios.get(i);
ParsedOp pop = pops.get(i);
String adapterName = pop.getOptionalStaticValue("driver", String.class)
.orElseThrow(() -> new OpConfigError(
"Unable to get driver name from ParsedOp:" + pop.toString()
));
OpMapper<Op> opOpMapper = mapperCache.get(adapterName);
OpDispenser<? extends Op> dispenser = opOpMapper.apply(pop);
DriverAdapter adapter = adapters.get(i);
OpMapper opMapper = adapter.getOpMapper();
OpDispenser<? extends Op> dispenser = opMapper.apply(pop);
// if (strict) {
// optemplate.assertConsumed();
// }