This is my first project in libGDX
and I am trying to loop a com.badlogic.gdx.utils.Array
:
//properties
...
private Array<Item> items;
...
//constructor
...
items = new Array<Item>();
...
//render method
...
for (Item item : items) {
item.update(deltaTime);
}
...
Android studio is highlighting items
with message on hover:
Using non reentrant iterator method: Array.iterator()
Iterator methods on LibGDX collections return the same iterator instance each time the method is called. For nested or multithreaded iteration create a new iterator using the appropriate constructor
I am not sure how to solve this, or if this is just a notice type of error, and if it is affecting anything on the long run.
Any ideas what this is and how to solve it?