Dear all, Please be informed that, due to an important technical maintenance, the Gitlab server (git.list.lu) will not be available on Thursday April 22nd, from 9 A.M. to 1 P.M. (Luxembourg Time Zone). Thank you for your understanding.

Commit a6aa0592 authored by Pony's avatar Pony

Added new list wrapper to avoid concurrent modification exceptions

parent 63fb29c3
......@@ -260,13 +260,14 @@ public class SpatialPositioningManager implements SpatialEventListener {
return null;
}
for (TangibleObject object : spatialMatrix.getHorizontal()) {
BaseWidget widget = TangibleObjectManager.getWidget(object.getObjectId());
if (widget.getClass().equals(_class)) {
return (T) widget;
synchronized (this) {
for (TangibleObject object : new ArrayList<>(spatialMatrix.getHorizontal())) {
BaseWidget widget = TangibleObjectManager.getWidget(object.getObjectId());
if (widget.getClass().equals(_class)) {
return (T) widget;
}
}
}
return null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment