Add comment to Navigation patch on why its done that way

to avoid accidently changing it in future and breaking things
This commit is contained in:
Aikar 2016-03-18 17:12:30 -04:00
parent af73f87c66
commit 57be47c2d1

View file

@ -67,6 +67,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- // NavigationAbstract navigationabstract = anavigationabstract1[k];
- // Spigot end
+ // Paper start
+ // DO NOT USE AN ITERATOR! This must be a for (;;) to avoid CME.
+ // This is perfectly safe, as additions are ok to be done in this iteration
+ // And Removals are queued instead of immediate.
+ for (int k = 0; k < this.navigators.size(); ++k) {
+ NavigationAbstract navigationabstract = this.navigators.get(k);
+ // Paper end