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="509bb786ad47b434-2990b7fa-42d648fd-91f88690-1bf6c6d180d0fa8267965559"><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="fba3d1f8465c5d9f-6671593f-4b014c7a-ab958813-804e6e6a6bf08b5398a18ea8"><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="7c37f895ccda8ac5-cb9410a8-400e482d-acae93d8-dd2938e3f3d8dcf6db063baa"><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>

...