ArrayIndexOutOfBoundsException at getColumnAlignments(Table.java:674)

Vaadin 6.5.1

It looks like the index value ‘i’ is incremented twice (once inside the ‘for’ construct and once inside the loop).


    public String[] getColumnAlignments() {
        if (columnAlignments == null) {
            return null;
        }
        final String[] alignments = new String[visibleColumns.size()]
;
        int i = 0;
        for (final Iterator<Object> it = visibleColumns.iterator(); it
                .hasNext(); i++) {
            alignments[i++]
 = getColumnAlignment(it.next());
        }

        return alignments;
    }

Clearly a bug. Created ticket
#6468
.

Thanks!

Fixed in the 6.5 branch, will be in the next nightly build and 6.5.2.