Skip to content

Commit

Permalink
refactoring according to KNIME
Browse files Browse the repository at this point in the history
  • Loading branch information
dietzc committed Jul 5, 2016
1 parent be68f39 commit 0c0a8c2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ private <I> JavaToDataCellConverter<?> addNewOutputConverter(
private <O> DataCellToJavaConverter<?, ?> addNewInputConverter(
final DataType inputType, final Class<O> outputType) {

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

if (!factory.isPresent()) {
throw new IllegalArgumentException("Can't convert from: "
+ inputType.getName() + " to :" + outputType.getName());
}
final DataCellToJavaConverter<Object, O> conv = factory.get().create();
final DataCellToJavaConverter<DataValue, O> conv = factory.get().create();
m_inConverters.put(createInputKey(inputType, outputType), conv);
return conv;
}
Expand Down

0 comments on commit 0c0a8c2

Please sign in to comment.