#223 String equality checking with "=="

release_3.2
closed
Check (274)
5
2012-10-10
2003-06-15
Tim Tyler
No

I've implemented a check as follows:

Checks that string literals are not used with == and !=.

Rationale: Often programmers use "a == b" by
mistake - when they mean to write: "a.equals(b)".

Currenly only the case where one side of the
comparison is a string literal is dealt with.

An example of how to configure the check is:

<module name="StringLiteralEquality"/>

Discussion

  • Lars Kühne

    Lars Kühne - 2003-06-24

    Logged In: YES
    user_id=401384

    this is now implemented in CVS, docs and tests still missing

     
  • Lars Kühne

    Lars Kühne - 2003-06-29

    Logged In: YES
    user_id=401384

    docs and tests have been comitted to CVS,
    StringLiteralEqualityCheck will be available in release 3.2

     

Log in to post a comment.