From a2db5590acc8bd8564e98d5940846755c6885aba Mon Sep 17 00:00:00 2001 From: David Huynh Date: Tue, 13 Apr 2010 06:28:13 +0000 Subject: [PATCH] Trim column names on import. git-svn-id: http://google-refine.googlecode.com/svn/trunk@461 7d457c2a-affb-35e4-300a-418c747d4874 --- .../java/com/metaweb/gridworks/importers/TsvCsvImporter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/importers/TsvCsvImporter.java b/src/main/java/com/metaweb/gridworks/importers/TsvCsvImporter.java index e3de06471..d99923612 100644 --- a/src/main/java/com/metaweb/gridworks/importers/TsvCsvImporter.java +++ b/src/main/java/com/metaweb/gridworks/importers/TsvCsvImporter.java @@ -55,9 +55,9 @@ public class TsvCsvImporter implements Importer { first = false; for (int c = 0; c < cells.size(); c++) { - String cell = cells.get(c); + String cell = cells.get(c).trim(); if (cell.startsWith("\"") && cell.endsWith("\"")) { - cell = cell.substring(1, cell.length() - 1); + cell = cell.substring(1, cell.length() - 1).trim(); } if (nameToIndex.containsKey(cell)) {