scijava-common
scijava-common copied to clipboard
DynamicCommand doesn't extend CommandModule
The fact that DynamicCommand extends DefaultMutableModule but not CommandModule leads to CommandService.run() returning null, as explained in the [DEBUG] output here:
https://github.com/scijava/scijava-common/blob/80d0a38fc9e9c1d85c3a5602cddedf6cd10984a7/src/main/java/org/scijava/command/DefaultCommandService.java#L345-L363
So the workaround is to get the CommandInfo and call ModuleService#run() on it to get the Future<Module>... but is there any chance to make it extend CommandModule but still implement the required interface MutableModule without breaking backwards compatibility?