Skip to content

Commit cef4999

Browse files
committed
Improve comments within adaptOp
1 parent d533fbc commit cef4999

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎scijava/scijava-ops/src/main/java/org/scijava/ops/impl/DefaultOpEnvironment.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,17 @@ private OpCandidate adaptOp(OpRef ref) throws OpMatchingException {
363363
}
364364

365365
try {
366-
// resolve adaptor dependencies and get the adaptor (as a function)
366+
// resolve adaptor dependencies
367367
final List<Object> dependencies = resolveOpDependencies(adaptor, map);
368+
368369
@SuppressWarnings("unchecked")
369370
Function<Object, Object> adaptorOp = //
370371
(Function<Object, Object>) adaptor.createOpInstance(dependencies) //
371372
.object(); //
372373

373374
// grab the first type parameter from the OpInfo and search for
374-
// an Op that will then be adapted (this will be the first (only) type
375-
// in the args of the adaptor)
375+
// an Op that will then be adapted (this will be the only input of the
376+
// adaptor since we know it is a Function)
376377
Type srcOpType = Types.substituteTypeVariables(adaptor.inputs().get(0)
377378
.getType(), map);
378379
final OpRef srcOpRef = inferOpRef(srcOpType, ref.getName(), map);

0 commit comments

Comments
 (0)