A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/784 below:

[java] [6.0.0] ForLoopCanBeForeach false-positive · Issue #784 · pmd/pmd · GitHub

for (Iterator<E> iterator = iterator(), otherIterator = other.iterator(); iterator.hasNext();) {
	E item = iterator.next();
	E otherItem = otherIterator.next();
	...
}

This code should not give a ForLoopCanBeForeach warning. At least I can't see another way of going through a couple of collections at the same time with a foreach. Am I wrong?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4