Table and IndexedContainer usage problem

Using Vaadin 6.6.6 (really would prefer one more sub-release for my numerical customers!) I subclassed
and in its constructor, I created an IndexedContainer that setup of the properties it would store, keeping a handle to the container in my subclass, and of course setting the Table container to use it.

Then, in a loop, I called a method on my subclass to add my data, and MyTable then did a
, with same results if I just used addItem(), and it resulted in a null pointer exception.

I traced this down to the method
AbstractContainer.fireItemSetChange(ItemSetChangeEvent event)
line 185:

((Container.ItemSetChangeListener) l[iSub]

Essentially item set change listener l[0]
is null. (Note that the subscript is really ‘i’ and not ‘iSub’ but the ‘i’ in brackets got stripped and turned on italics instead.)

So, is this usage just not allowed, or should Vaadin code test for l[iSub]
being null?

I fixed this by essentially moving the container creation from MyTable, populating the container fully, then creating the Table to use that container. I am not sure why it’s “wrong” though since I can update the container, clear the container, reload the container, etc. and the Table has no issues with it.

Could you try to check where null is added as an ItemSetChangeListener. If Vaadin itself is doing that, please report it as a bug.