AbstractSelect addItems method

I see in Vaadin 7.2, two new methods were added for adding multiple items. One takes a varargs parameter and the other a Collection. The two methods are shown below for reference.

[code]
public void addItems(Object… itemId) throws UnsupportedOperationException {
for (Object id : itemId) {
addItem(id);
}
}

public void addItems(Collection itemIds) throws UnsupportedOperationException {
addItems(itemIds.toArray());
}
[/code]So, lets say I had an ArrayList of items to add like this.

ArrayList<String> items = new ArrayList<String>(); select.addItems(items); You would think that the addItems that takes the Collection gets called, but it doesn’t. The method that takes the varargs parameter gets called, which results in the ArrayList being added as one item. The only way I can call the addItems method that takes the Collection is to cast my items to a Collection.

ArrayList<String> items = new ArrayList<String>(); select.addItems((Collection)items); Am I doing something wrong? It sucks that I have to cast my items explicitly to a Collection to get the right method called. Was this the intended use of this api? Someone set me straight…

Thanks,

-Dan

It looks like my concerns were addressed in this
ticket
which was included in the 7.2.2 Vaadin release.