Source:
<code>public DataContext create(DataContextProperties properties, ResourceFactoryRegistry resourceFactoryRegistry) { assert accepts(properties, resourceFactoryRegistry); final Resource resource = resourceFactoryRegistry.createResource(properties.getResourceProperties()); final int columnNameLineNumber = getInt(properties.getColumnNameLineNumber(), CsvConfiguration.DEFAULT_COLUMN_NAME_LINE); final String encoding = getString(properties.getEncoding(), FileHelper.DEFAULT_ENCODING); final char separatorChar = getChar(properties.getSeparatorChar(), CsvConfiguration.DEFAULT_SEPARATOR_CHAR); final char quoteChar = getChar(properties.getQuoteChar(), CsvConfiguration.DEFAULT_QUOTE_CHAR); final char escapeChar = getChar(properties.getEscapeChar(), CsvConfiguration.DEFAULT_ESCAPE_CHAR); final boolean failOnInconsistentRowLength = getBoolean(properties.isFailOnInconsistentRowLength(), false); final boolean multilineValuesEnabled = getBoolean(properties.isMultilineValuesEnabled(), true); final ColumnNamingStrategy columnNamingStrategy; if (properties.getTableDefs() == null) { columnNamingStrategy = null; } else { final SimpleTableDef firstTable = properties.getTableDefs()[0]; final String[] columnNames = firstTable.getColumnNames(); columnNamingStrategy = new CustomColumnNamingStrategy(columnNames); } final ColumnTypingStrategy columnTypingStrategy; if (properties.getTableDefs() == null) { columnTypingStrategy = null; } else { <START> final SimpleTableDef firstTable = properties.getTableDefs()[0]; <END> final ColumnType[] columnTypes = firstTable.getColumnTypes(); columnTypingStrategy = new CustomColumnTypingStrategy(columnTypes); } final CsvConfiguration configuration = new CsvConfiguration(columnNameLineNumber, columnNamingStrategy, columnTypingStrategy, encoding, separatorChar, quoteChar, escapeChar, failOnInconsistentRowLength, multilineValuesEnabled); return new CsvDataContext(resource, configuration); }</code><technical_language>Nice touch table defs in factory</technical_language>

Target:
public DataContext create(DataContextProperties properties, ResourceFactoryRegistry resourceFactoryRegistry) { assert accepts(properties, resourceFactoryRegistry); final Resource resource = resourceFactoryRegistry.createResource(properties.getResourceProperties()); final int columnNameLineNumber = getInt(properties.getColumnNameLineNumber(), CsvConfiguration.DEFAULT_COLUMN_NAME_LINE); final String encoding = getString(properties.getEncoding(), FileHelper.DEFAULT_ENCODING); final char separatorChar = getChar(properties.getSeparatorChar(), CsvConfiguration.DEFAULT_SEPARATOR_CHAR); final char quoteChar = getChar(properties.getQuoteChar(), CsvConfiguration.DEFAULT_QUOTE_CHAR); final char escapeChar = getChar(properties.getEscapeChar(), CsvConfiguration.DEFAULT_ESCAPE_CHAR); final boolean failOnInconsistentRowLength = getBoolean(properties.isFailOnInconsistentRowLength(), false); final boolean multilineValuesEnabled = getBoolean(properties.isMultilineValuesEnabled(), true); final ColumnNamingStrategy columnNamingStrategy; if (properties.getTableDefs() == null) { columnNamingStrategy = null; } else { final SimpleTableDef firstTable = properties.getTableDefs()[0]; final String[] columnNames = firstTable.getColumnNames(); columnNamingStrategy = new CustomColumnNamingStrategy(columnNames); } final ColumnTypingStrategy columnTypingStrategy; if (properties.getTableDefs() == null) { columnTypingStrategy = null; } else { final SimpleTableDef firstTable = properties.getTableDefs()[0]; columnTypingStrategy = new CustomColumnTypingStrategy(firstTable); } final CsvConfiguration configuration = new CsvConfiguration(columnNameLineNumber, columnNamingStrategy, columnTypingStrategy, encoding, separatorChar, quoteChar, escapeChar, failOnInconsistentRowLength, multilineValuesEnabled); return new CsvDataContext(resource, configuration); }