simoc / csvjdbc

Mirror of git://git.code.sf.net/p/csvjdbc/code
http://csvjdbc.sourceforge.net
GNU Lesser General Public License v2.1
85 stars 35 forks source link

NullPointerError for rs.getMetadata() when csv file contains only columns without values #140

Open dmitriygg opened 1 month ago

dmitriygg commented 1 month ago

NullPointerError for rs.getMetadata() when csv file contains only columns without values

net/sourceforge/csvjdbc/csvjdbc/1.0.42/csvjdbc-1.0.42-sources.jar!/org/relique/jdbc/csv/StringConverter.java:963

image

Example csv file: departments.csv

simoc commented 1 month ago

This works correctly for me with a simple test program executing SQL statement ResultSet results = stmt.executeQuery("SELECT * FROM departments"), then calling ResultSetMetaData meta = results.getMetaData() and meta.getColumnType(1).

Do you have a simple example that demonstrates the problem?