KT-19565: J2K: Determine mutability using iterator

#KT-19565 fixed
This commit is contained in:
Denis Grachev
2017-09-18 14:07:57 +03:00
committed by Simon Ogorodnik
parent d312996f3a
commit 0722c5c13a
7 changed files with 100 additions and 2 deletions
@@ -0,0 +1,14 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class TestMutableCollection {
public final List<String> list = new ArrayList<>();
public void test() {
for (Iterator<String> it = list.iterator(); it.hasNext(); ) {
String s = it.next();
if (s.equals("")) it.remove();
}
}
}