Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
HierarchicalContainer removeItem fails
Hi,
I stumbled across a design error at HierarchicalContainer#removeItem.
The problem becomes visible if you first add an item, then remove this item and add an item with the same itemId again.
First the method calls super.removeItem(itemId).
Then it calls isRoot(itemId).
But because the itemId is already removed this method returns always false.
So the itemid remains in roots.
As long as you never add this itemId again to the container this flaw keeps hidden.
I suggest to first check, if it's a root, and then remove it from container.
This should already be fixed in the 6.3 branch by the changes made for ticket 4192. Can you test this with the latest 6.3 nightly build?
I tested it with the vaadin-6.3.0.nightly-20100316-c11917.jar and the behaviour seems ok.