[java S5413] FP when followed by break/return

Qube: Community 9.9

The Java rule S5413 reports a FP, if the call to list.remove() is followed by break or return (more or less directly).


List<String> list = ...;

for (int i = 0; i < list.size(); i++)
    if (i == 3)
        list.remove(i); // FP

Hey there.

Thanks for the report. It has been previously reported and tracked here: SONARJAVA-4414