ForEachIterable
This loop can be replaced with an enhanced for loop.

Severity
SUGGESTION

The problem

Prefer enhanced for loops instead of explicitly using an iterator where possible.

That is, prefer this:

for (T element : list) {
  doSomething(element);
}

to this:

for (Iterator<T> iterator = list.iterator(); iterator.hasNext(); ) {
  doSomething(iterator.next());
}

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("ForEachIterable") to the enclosing element.