public List<?> convert(CamelContext camelContext, List<?> values, Class[] targetTypes) {
        LOG.debug("About to convert those arguments: {}", values);
        List<Object> convertedArguments = new ArrayList<>(values.size());
        for (int i = 0; i < values.size(); i++) {
            try {
                convertedArguments.add(camelContext.getTypeConverter().mandatoryConvertTo(targetTypes[i], values.get(i)));
            } catch (NoTypeConversionAvailableException e) {
                LOG.debug("Failed to convert {} to type {}. Falling back to Jackson conversion.",
                        values.get(i), targetTypes[i]);
                convertedArguments.add(objectMapper.convertValue(values.get(i), targetTypes[i]));
            }
        }
        LOG.debug("Converted arguments: {}", convertedArguments);
        return convertedArguments;
    }
public List < ? > convert ( CamelContext camelContext , List < ? > values , Class [ ] targetTypes ) { LOG . debug ( "About to convert those arguments: {}" , values ) ; List < Object > convertedArguments = new ArrayList < > ( values . size ( ) ) ; for ( int i = 0 ; i < values . size ( ) ; i ++ ) { try { convertedArguments . add ( camelContext . getTypeConverter ( ) . mandatoryConvertTo ( targetTypes [ i ] , values . get ( i ) ) ) ; } catch ( NoTypeConversionAvailableException e ) { LOG . debug ( "Failed to convert {} to type {}. Falling back to Jackson conversion." , values . get ( i ) , targetTypes [ i ] ) ; convertedArguments . add ( objectMapper . convertValue ( values . get ( i ) , targetTypes [ i ] ) ) ; } } LOG . debug ( "Converted arguments: {}" , convertedArguments ) ; return convertedArguments ; }
Operations