Skip to content

Commit 32ced3c

Browse files
committed
AbstractWrapperService: tweak method name
The private method called "wrap" really just located an appropriate wrapper object. It did not actually populate it with the data.
1 parent 9e330e1 commit 32ced3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public abstract class AbstractWrapperService<DT, PT extends WrapperPlugin<DT>>
5151

5252
@Override
5353
public <D extends DT> PT create(final D data) {
54-
final PT instance = wrap(data);
54+
final PT instance = findWrapper(data);
5555
if (instance == null) {
5656
throw new IllegalArgumentException("No compatible " +
5757
getPluginType().getSimpleName() + " for data object: " + data);
@@ -73,12 +73,12 @@ public void initialize() {
7373

7474
@Override
7575
public boolean supports(final DT data) {
76-
return wrap(data) != null;
76+
return findWrapper(data) != null;
7777
}
7878

7979
// -- Helper methods --
8080

81-
private <D extends DT> PT wrap(final D data) {
81+
private <D extends DT> PT findWrapper(final D data) {
8282
for (final PluginInfo<PT> plugin : getPlugins()) {
8383
final PT instance = getPluginService().createInstance(plugin);
8484
if (instance.supports(data)) return instance;

0 commit comments

Comments
 (0)