]> source.dussan.org Git - jackcess.git/commitdiff
always pass Object[] to ImportFilter.filterRow
authorJames Ahlborn <jtahlborn@yahoo.com>
Wed, 30 Nov 2011 14:58:03 +0000 (14:58 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Wed, 30 Nov 2011 14:58:03 +0000 (14:58 +0000)
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

index 571ebfa17c7d1e2a5121516be24494d0140ecf9a..28aa9ea5ae8b2ea4fd89f542f0160b0c97dbb46d 100644 (file)
@@ -447,10 +447,10 @@ public class ImportUtil
       if(!useExistingTable || ((table = db.getTable(name)) == null)) {
 
         List<Column> columns = new LinkedList<Column>();
-        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)]);
   }
 
   /**