Fix index out of bounds exception when separator is the empty string

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2354 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2011-11-04 17:31:51 +00:00
parent 09889e75c5
commit cacbedd352

View File

@ -92,7 +92,7 @@ public class SeparatorBasedImporter extends TabularImportingParserBase {
) { ) {
// String lineSeparator = JSONUtilities.getString(options, "lineSeparator", "\n"); // String lineSeparator = JSONUtilities.getString(options, "lineSeparator", "\n");
String sep = JSONUtilities.getString(options, "separator", "\t"); String sep = JSONUtilities.getString(options, "separator", "\t");
if (sep == null) { if (sep == null || "".equals(sep)) {
sep = "\t"; sep = "\t";
} }
boolean processQuotes = JSONUtilities.getBoolean(options, "processQuotes", true); boolean processQuotes = JSONUtilities.getBoolean(options, "processQuotes", true);