Skip to content

Commit 0c0a8c2

Browse files
committed
refactoring according to KNIME
1 parent be68f39 commit 0c0a8c2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

org.knime.scijava.commands/src/org/knime/scijava/commands/converter/DefaultConverterCacheService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,13 @@ private <I> JavaToDataCellConverter<?> addNewOutputConverter(
9999
private <O> DataCellToJavaConverter<?, ?> addNewInputConverter(
100100
final DataType inputType, final Class<O> outputType) {
101101

102-
final Optional<DataCellToJavaConverterFactory<Object, O>> factory = m_inRegister
103-
.getConverterFactory(inputType, outputType);
102+
final Optional<DataCellToJavaConverterFactory<DataValue, O>> factory = m_inRegister.getPreferredConverterFactory(inputType, outputType);
104103

105104
if (!factory.isPresent()) {
106105
throw new IllegalArgumentException("Can't convert from: "
107106
+ inputType.getName() + " to :" + outputType.getName());
108107
}
109-
final DataCellToJavaConverter<Object, O> conv = factory.get().create();
108+
final DataCellToJavaConverter<DataValue, O> conv = factory.get().create();
110109
m_inConverters.put(createInputKey(inputType, outputType), conv);
111110
return conv;
112111
}

0 commit comments

Comments
 (0)