Versions Compared

Key

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

...

The Coverity Prevent Version 5.0 MUTABLE_COMPARISON checker can detect the instances where compareTo method is reading from a non-constant field. If the non-constant field is modified, the value of compareTo might change, which may break program invariants.

Related

...

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e06749e926bae754-4f03bbc6-4d8c4d96-a976ba58-e669465db8b7e5f3a3520274"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

method [compareTo()

http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html#compareTo(java.lang.Object)]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="82e4bec7749f2a41-d4199676-4a364057-b82fb351-7c013d3e7bb9f3de25ded4f0"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

 

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

...