From f646e75d5b90647d9b2c65b938dc3adf84ddae02 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Wed, 30 Nov 2011 14:58:03 +0000 Subject: [PATCH] always pass Object[] to ImportFilter.filterRow git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@600 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/ImportUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/healthmarketscience/jackcess/ImportUtil.java b/src/java/com/healthmarketscience/jackcess/ImportUtil.java index 571ebfa..28aa9ea 100644 --- a/src/java/com/healthmarketscience/jackcess/ImportUtil.java +++ b/src/java/com/healthmarketscience/jackcess/ImportUtil.java @@ -447,10 +447,10 @@ public class ImportUtil if(!useExistingTable || ((table = db.getTable(name)) == null)) { List columns = new LinkedList(); - String[] columnNames = splitLine(line, delimPat, quote, in, 0); + Object[] columnNames = splitLine(line, delimPat, quote, in, 0); for (int i = 0; i < columnNames.length; i++) { - columns.add(new ColumnBuilder(columnNames[i], DataType.TEXT) + columns.add(new ColumnBuilder((String)columnNames[i], DataType.TEXT) .escapeName() .setLength((short)DataType.TEXT.getMaxSize()) .toColumn()); @@ -502,7 +502,7 @@ public class ImportUtil * Splits the given line using the given delimiter pattern and quote * character. May read additional lines for quotes spanning newlines. */ - private static String[] splitLine(String line, Pattern delim, char quote, + private static Object[] splitLine(String line, Pattern delim, char quote, BufferedReader in, int numColumns) throws IOException { @@ -573,7 +573,7 @@ public class ImportUtil } } - return tokens.toArray(new String[Math.max(tokens.size(), numColumns)]); + return tokens.toArray(new Object[Math.max(tokens.size(), numColumns)]); } /** -- 2.39.5