Fixed issue 127 - Add column from Freebase raises exception. Made sure DataExtensionChange saves properly.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1261 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-09-10 04:53:37 +00:00
parent e6d293bcc8
commit 9acd3dbe05

View File

@ -261,6 +261,11 @@ public class DataExtensionChange implements Change {
} }
writer.write("dataExtensionCount="); writer.write(Integer.toString(_dataExtensions.size())); writer.write('\n'); writer.write("dataExtensionCount="); writer.write(Integer.toString(_dataExtensions.size())); writer.write('\n');
for (DataExtension dataExtension : _dataExtensions) { for (DataExtension dataExtension : _dataExtensions) {
if (dataExtension == null) {
writer.write('\n');
continue;
}
writer.write(Integer.toString(dataExtension.data.length)); writer.write('\n'); writer.write(Integer.toString(dataExtension.data.length)); writer.write('\n');
for (Object[] values : dataExtension.data) { for (Object[] values : dataExtension.data) {
@ -363,6 +368,11 @@ public class DataExtensionChange implements Change {
if (line == null) continue; if (line == null) continue;
if (line.length() == 0) {
dataExtensions.add(null);
continue;
}
int rowCount = Integer.parseInt(line); int rowCount = Integer.parseInt(line);
Object[][] data = new Object[rowCount][]; Object[][] data = new Object[rowCount][];