Skip to content

Commit 3895f2d

Browse files
committed
Make the UIService in FilePreprocessor optional
If there is no UIService: easy, we don't have to do anything in the FilePreprocessor class. This happens to fix a lot of stack traces show in otherwise succeeding unit tests, reported by Jodene Jenkins. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 62b916a commit 3895f2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/ui/FilePreprocessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@
5252
priority = Priority.VERY_LOW_PRIORITY + 1)
5353
public class FilePreprocessor extends AbstractPreprocessorPlugin {
5454

55-
@Parameter
55+
@Parameter(required = false)
5656
private UIService uiService;
5757

5858
// -- ModuleProcessor methods --
5959

6060
@Override
6161
public void process(final Module module) {
62+
if (uiService == null) return;
6263
final ModuleItem<File> fileInput = getFileInput(module);
6364
if (fileInput == null) return;
6465

0 commit comments

Comments
 (0)