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="a92122f8950403c4-6e1bdce4-4a6845b1-8e84be96-970c3d8193f88a32d45642d6"><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="901c3b2c80bf07a6-f2027f5d-4e434fe4-ad86950a-fb27eea468c5a2c882ace3b1"><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="7287993a67b9abae-6e9e0c81-44c34e3b-bf90bb52-b7c7f23d71e6b3a68fc218c8"><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>

...