NoSuchElementException thrown in GraphListeners when an attribute is changed simultaneously by different threads, even using a synchronizedGraph.
The Cause
A concurrent event sended to GraphListeners by sendAttributeChangedEvent() who wasn't protected by a lock in a case when attributes from different sources (graph/node/edge) was changed.
The Solution (Edit)
Change the attributeLock to a static attribute
private static final ReentrantLock attributeLock = new ReentrantLock(); // Static to lock the attributes from different sources (graph/node/edge). Fix issue #293
- Adding a unit test for the concurrency change of attributes
The Problem
NoSuchElementException thrown in GraphListeners when an attribute is changed simultaneously by different threads, even using a synchronizedGraph.
The Cause
A concurrent event sended to GraphListeners by sendAttributeChangedEvent() who wasn't protected by a lock in a case when attributes from different sources (graph/node/edge) was changed.
The Solution (Edit)