Versions Compared

Key

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

...

Using reference equality to compare objects can lead to unexpected results.

Guideline Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP01-J

low

probable

medium

P4

L3

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1daf4b9641606791-4051db20-411f4fda-b442bcc9-82e7d30e5d778a210cdfa25d"><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="7cadf8c3a487ba1d-f7d7bd88-4284463f-8deebbab-2a9ee0837413718f3549721b"><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="dd4b6f14dfee8060-1ab9bad8-4a6f4d3a-83a38052-b9f7d89fc04cb838af2f92cd"><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>

...