Menu

#1333 False-positive SA_FIELD_DOUBLE_ASSIGNMENT for array elements

3.0.1
closed-fixed
None
3
2015-02-21
2014-11-22
No

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.

Discussion

  • William Pugh

    William Pugh - 2015-02-02
    • status: open --> open-accepted
    • assigned_to: William Pugh
     
  • Tagir Valeev

    Tagir Valeev - 2015-02-21

    Looks like it's fixed by William. Closing.

     
  • Tagir Valeev

    Tagir Valeev - 2015-02-21
    • status: open-accepted --> closed-fixed
    • Group: 3.x --> 3.0.1
     

Log in to post a comment.

MongoDB Logo MongoDB