Versions Compared

Key

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

...

Detection of all uses of the reference equality operators on boxed primitive objects is straightforward. Determining the correctness of such uses is infeasible in the general case.

Related Guidelines

MITRE CWE

CWE-595 "Comparison of Object References Instead of Object Contents"

 

CWE-597 "Use of Wrong Operator in String Comparison"

Bibliography

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0bbae9fb93118159-665f2148-453b4776-b45aba2a-f0e9fdcc76b672d200bbb792"><ac:plain-text-body><![CDATA[

[[Bloch 2009

AA. Bibliography#Bloch 09]]

4. "Searching for the One"

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9b3f2363b2c9f618-49d06a7b-40824a2d-9885bb45-dca7ebac61e04eb2262d66ad"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[§5.1.7, "Boxing Conversion"

http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.7]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2746430187dcc9c1-72fc39da-423c45a4-aa5795f8-894958ab5698d69475e1b21c"><ac:plain-text-body><![CDATA[

[[Pugh 2009

AA. Bibliography#Pugh 09]]

Using == to compare objects rather than .equals

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

...