Skip to content

Commit f4af886

Browse files
Treiblesschorlegselzer
authored andcommitted
Add check for outputs and set candidate status code
1 parent 0c4c3d6 commit f4af886

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/main/java/org/scijava/ops/matcher/DefaultOpTypeMatchingService.java‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,18 @@ private boolean typesPerfectMatch(final OpCandidate candidate) {
233233
}
234234
i++;
235235
}
236+
237+
Type[] outputTypes = candidate.getRef().getOutTypes();
238+
i = 0;
239+
for (final Type t : OpUtils.outputTypes(candidate)) {
240+
if (outputTypes[i] != null) {
241+
if (!t.equals(outputTypes[i]))
242+
return false;
243+
}
244+
i++;
245+
}
246+
247+
candidate.setStatus(StatusCode.MATCH);
236248
return true;
237249
}
238250

0 commit comments

Comments
 (0)