Hi!

In JSPStateManagerImpl NPEs might happen (I think in conjunction with
DummyForm) if SerializedViewCollection.add will be called more than once
per page.
Which is a documented behaviour in DummyFormUtils.

The reason is, that the _keys list will contain the same key more than
once than, now, if it comes that views have to be removed (more views in
session than configured) the same key will be removed more than once and
the old view put into the oldSerializedViewsMap.
In the second iteration a NPE will be thrown as _serializedViews will
return "null" then (the view already were removed).

To avoid this exception I added
while (_keys.remove(key));
to ensure the key will be unique in the _keys list.

I dont have the feeling that this is the best possible solution to this
problem.
Any objections - better solutions?

---
Mario

Reply via email to