diff --git a/org.knime.scijava.commands/src/org/knime/scijava/commands/converter/DefaultConverterCacheService.java b/org.knime.scijava.commands/src/org/knime/scijava/commands/converter/DefaultConverterCacheService.java index 7ac8d51..6fe7d04 100644 --- a/org.knime.scijava.commands/src/org/knime/scijava/commands/converter/DefaultConverterCacheService.java +++ b/org.knime.scijava.commands/src/org/knime/scijava/commands/converter/DefaultConverterCacheService.java @@ -99,14 +99,13 @@ private JavaToDataCellConverter addNewOutputConverter( private DataCellToJavaConverter addNewInputConverter( final DataType inputType, final Class outputType) { - final Optional> factory = m_inRegister - .getConverterFactory(inputType, outputType); + final Optional> factory = m_inRegister.getPreferredConverterFactory(inputType, outputType); if (!factory.isPresent()) { throw new IllegalArgumentException("Can't convert from: " + inputType.getName() + " to :" + outputType.getName()); } - final DataCellToJavaConverter conv = factory.get().create(); + final DataCellToJavaConverter conv = factory.get().create(); m_inConverters.put(createInputKey(inputType, outputType), conv); return conv; }