Skip to content

Commit 1d39079

Browse files
ctruedenimagejan
authored andcommitted
ResultsPostprocessor: do not require UIService
If there isn't one, we simply do nothing. This avoids "Required service is missing" injection errors when instantiating this postprocessor.
1 parent c74cb07 commit 1d39079

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/net/imagej/table/process/ResultsPostprocessor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,18 @@
5757
priority = Priority.VERY_LOW_PRIORITY + 1)
5858
public class ResultsPostprocessor extends AbstractPostprocessorPlugin {
5959

60-
@Parameter
60+
@Parameter(required = false)
6161
private UIService ui;
6262

6363
// -- ModuleProcessor methods --
6464

6565
@Override
6666
public void process(final Module module) {
67+
if (ui == null) {
68+
// no UIService available for displaying results
69+
return;
70+
}
71+
6772
// filter the compatible outputs (simple types: number, boolean, text)
6873
final ArrayList<ModuleItem<?>> outputs = new ArrayList<>();
6974
module.getInfo().outputs().forEach(output -> {

0 commit comments

Comments
 (0)