The setting Report java.util.List indexed loops is responsible for finding loops involving list.get(index) calls. These loops generally can be replaced with the foreach loops, unless they modify underlying list in the process, e.g. by calling list.remove(index). If latter is the case, foreach form of loop may throw ConcurrentModificationException.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Powered by InspectionGadgets