Skip to content

Commit 1e100de

Browse files
committed
Remove convoluted getCompatibleInputs logic
Given this method has a return type of Collection, there is no need to use an ordered set or to then build that set into a list.
1 parent 4ecbb8d commit 1e100de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/convert/AbstractConvertService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ public boolean supports(final Class<?> src, final Type dest) {
106106

107107
@Override
108108
public Collection<Object> getCompatibleInputs(Class<?> dest) {
109-
Set<Object> objects = new LinkedHashSet<Object>();
109+
Set<Object> objects = new HashSet<Object>();
110110

111111
for (final Converter<?, ?> c : getInstances()) {
112112
if (dest.isAssignableFrom(c.getOutputType())) {
113113
c.populateInputCandidates(objects);
114114
}
115115
}
116116

117-
return new ArrayList<Object>(objects);
117+
return objects;
118118
}
119119

120120
@Override

0 commit comments

Comments
 (0)