// "Replace Stream API chain with loop" "true" import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class Main { private List asList(CharSequence s) { return Collections.singletonList(s); } public List getList() { return Collections.emptyList(); } private void collect() { List> res2 = getList().stream().map(this::asList).collect(Collectors.toList()); System.out.println(res2); } }