avoid an array out of bounds exception in case there are no columns in the dataset
(I know, it should not happen but when it does let's not barf) git-svn-id: http://google-refine.googlecode.com/svn/trunk@375 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
62f5f21ca3
commit
4eda7ae2c0
@ -100,8 +100,11 @@ public class ColumnModel implements Jsonizable {
|
||||
}
|
||||
writer.endArray();
|
||||
|
||||
writer.key("keyCellIndex"); writer.value(getKeyColumnIndex());
|
||||
writer.key("keyColumnName"); writer.value(columns.get(_keyColumnIndex).getName());
|
||||
if (columns.size() > 0) {
|
||||
writer.key("keyCellIndex"); writer.value(getKeyColumnIndex());
|
||||
writer.key("keyColumnName"); writer.value(columns.get(_keyColumnIndex).getName());
|
||||
}
|
||||
|
||||
writer.key("columnGroups");
|
||||
writer.array();
|
||||
for (ColumnGroup g : _rootColumnGroups) {
|
||||
|
Loading…
Reference in New Issue
Block a user