int () { int total = 0; final List<? extends Integer> ints = new ArrayList<Integer>(); <warning descr="'for' loop can be replaced with enhanced 'for'">for</warning>(Iterator<? extends Integer> iterator = ints.iterator(); iterator.hasNext();){ final Integer value = iterator.next(); total += value.intValue(); } return total; }