Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Coverity Prevent Version 5.0 BAD_EQ checker can detect instances where the " == " operator is being used for equality of objects when, ideally, the equal method should have been used. The " == " operator could consider the objects to be different whereas the equals method would consider them to be the same.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e818dbbd4764d5d8-c22f40ac-4fd94fbe-8a438cd0-f9fb95e0cc270817c1bd4234"><ac:plain-text-body><![CDATA[

[[FindBugs 2008

AA. Bibliography#FindBugs 08]]

ES: Comparison of String objects using == or !=

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d40f954222c63d0a-df993b84-4b0f4bab-85268c09-9b3d9af8e3ac01b26b8eba8f"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[§3.10.5, "String Literals"

http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.10.5]

]]></ac:plain-text-body></ac:structured-macro>

 

§5.6.2, "Binary Numeric Promotion"

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="13247a0261a66408-3804b2fc-4b8c4e0e-8883a7ad-43a482d01d830ce6aaecf966"><ac:plain-text-body><![CDATA[

[[Rogue 2000

AA. Bibliography#Rogue 2000]]

Rule 79: Use equals(), not ==, to test for equality of objects

]]></ac:plain-text-body></ac:structured-macro>

...