From 0c0a8c22a4897059ef990dba150a18602b3a3eaa Mon Sep 17 00:00:00 2001 From: dietzc Date: Tue, 5 Jul 2016 14:37:39 +0200 Subject: [PATCH] refactoring according to KNIME --- .../commands/converter/DefaultConverterCacheService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }