Correct column counting so maxCellIndex represents current count rather than next column
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2335 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
5d6ab76b7c
commit
9710521ef8
@ -54,7 +54,7 @@ public class ColumnModel implements Jsonizable {
|
||||
final public List<Column> columns = new LinkedList<Column>();
|
||||
final public List<ColumnGroup> columnGroups = new LinkedList<ColumnGroup>();
|
||||
|
||||
private int _maxCellIndex;
|
||||
private int _maxCellIndex = -1;
|
||||
private int _keyColumnIndex;
|
||||
|
||||
transient protected Map<String, Column> _nameToColumn;
|
||||
@ -75,7 +75,7 @@ public class ColumnModel implements Jsonizable {
|
||||
}
|
||||
|
||||
synchronized public int allocateNewCellIndex() {
|
||||
return _maxCellIndex++;
|
||||
return ++_maxCellIndex;
|
||||
}
|
||||
|
||||
synchronized public void setKeyColumnIndex(int keyColumnIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user