Found this false-positive when testing some open-source projects:
import java.awt.Point;
public class DoubleAssignment {
public void resetPointsX(Point[] p) {
assert p.length == 2;
p[0].x = 0;
p[1].x = 0;
}
}
SA_FIELD_DOUBLE_ASSIGNMENT (Low/20) is reported despite the fact that different array elements are assigned.
Have no time right now to investigate this issue in detail. Feel free to take this if you like.
Testcase is committed:
https://code.google.com/p/findbugs/source/detail?r=b7eed04732a7898559f589005253574c9be45634
Looks like it's fixed by William. Closing.