Skip to content

Commit 2f5e13c

Browse files
committed
AbstractWrapperService: make LogService optional
1 parent 57ba53f commit 2f5e13c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/org/scijava/plugin/AbstractWrapperService.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public abstract class AbstractWrapperService<DT, PT extends WrapperPlugin<DT>>
4444
extends AbstractTypedService<DT, PT> implements WrapperService<DT, PT>
4545
{
4646

47-
@Parameter
47+
@Parameter(required = false)
4848
private LogService log;
4949

5050
// -- WrapperService methods --
@@ -66,8 +66,10 @@ public <D extends DT> WrapperPlugin<D> create(final D data) {
6666

6767
@Override
6868
public void initialize() {
69-
log.info("Found " + getPlugins().size() + " " +
70-
getPluginType().getSimpleName() + " plugins.");
69+
if (log != null) {
70+
log.info("Found " + getPlugins().size() + " " +
71+
getPluginType().getSimpleName() + " plugins.");
72+
}
7173
}
7274

7375
// -- Typed methods --

0 commit comments

Comments
 (0)