Skip to content

Commit 443550d

Browse files
committed
AbstractWrapperService: fix serious wrapping bug
When calling the create method, after a match is found, the data needs to actually get populated by calling the set method. Otherwise, the create method will return an unpopulated wrapper object. This bug was not discovered until now because the only core type of WrapperPlugin, the InputWidget, overrode the create method with its own implementation that populated the data properly.
1 parent 32ced3c commit 443550d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public <D extends DT> PT create(final D data) {
5656
throw new IllegalArgumentException("No compatible " +
5757
getPluginType().getSimpleName() + " for data object: " + data);
5858
}
59+
instance.set(data);
5960
return instance;
6061
}
6162

0 commit comments

Comments
 (0)