Skip to content

Commit fcffe20

Browse files
committed
AbstractInputHarvester: fix generic type hackery
1 parent 01fc93f commit fcffe20

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/org/scijava/widget/AbstractInputHarvester.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,10 @@ private <T> WidgetModel addInput(final InputPanel<P, W> inputPanel,
128128
}
129129

130130
/** Asks the object service and convert service for valid choices */
131-
@SuppressWarnings("unchecked")
132-
private List<?> getObjects(final Class<?> type) {
133-
@SuppressWarnings("rawtypes")
134-
Set compatibleInputs =
135-
new HashSet(convertService.getCompatibleInputs(type));
131+
private List<Object> getObjects(final Class<?> type) {
132+
Set<Object> compatibleInputs =
133+
new HashSet<>(convertService.getCompatibleInputs(type));
136134
compatibleInputs.addAll(objectService.getObjects(type));
137135
return new ArrayList<>(compatibleInputs);
138136
}
139-
140137
}

0 commit comments

Comments
 (0)