dr0ps opened a new pull request, #587: URL: https://github.com/apache/wicket/pull/587
InSessionPageStore.SessionData#pages is a LinkedList. LinkedList is not thread-safe and keeps a rather complex state as it has to keep track of first and last element and the list size. The combination leads to some fragility. For instance, if multiple threads concurrently remove the same element, both operations will succeed (and remove the same element) but the individually stored list size will get reduced twice. In the case of Wicket-6966 and WICKET-7013 this has happened. The exception message states that the current list size is -1. InSessionPageStore.SessionData#pages is only accessed in InSessionPageStore.SessionData itself and InSessionPageStore.CountLimitedData. Most accesses are in synchronized instance methods. Unfortunately InSessionPageStore.SessionData#writeObject(OutputStream) contains multiple accesses of the pages list without any synchronization. Therefore should serialization occur while e.G. new page instances are being created this might corrupt the state of the LinkedList. This merge request removes the last unsynchronized calls. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org