considering this example:
public static void main(final String[] args) {
final List myList = Arrays.asList(\"A\", \"B\", \"C\", \"D\");
It can't optimize it, because mylist.size() could change during loop execution. Even if it's final, this just means that the reference is final (meaning you can't reassign myList to some other object), but methods on myList, such as remove() and add() are still available. Final does not make object immutable.