File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/org/scijava/batch Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 55
66import org .scijava .Priority ;
77import org .scijava .command .CommandService ;
8+ import org .scijava .log .LogService ;
89import org .scijava .module .ModuleInfo ;
910import org .scijava .plugin .Parameter ;
1011import org .scijava .plugin .Plugin ;
1516public final class FileBatchService extends AbstractService implements
1617 BatchService {
1718
19+ @ Parameter
20+ private LogService log ;
21+
1822 @ Parameter
1923 private CommandService commandService ;
2024
@@ -28,6 +32,11 @@ public boolean supports(Class<?> type) {
2832
2933 @ Override
3034 public void run (ModuleInfo moduleInfo ) {
35+ // check if moduleInfo has batchable inputs
36+ if (batchableInputs (moduleInfo ).isEmpty ()) {
37+ log .error ("No compatible inputs (of type File) found." );
38+ return ;
39+ }
3140 // Call ModuleBatchProcessor with input moduleInfo
3241 HashMap <String , Object > inputMap = new HashMap <>();
3342 inputMap .put ("moduleInfo" , moduleInfo );
You can’t perform that action at this time.
0 commit comments