Versions Compared

Key

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

...

The method AbsAdd() computes and returns the sum of the absolute value of parameters x and y. It lacks parameter validation, in violation of MET01MET00-J. Validate method parameters. Consequently, it can produce incorrect results either because of integer overflow or when either or both of its arguments are Math.abs(Integer.MIN_VALUE).

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8cb8caeecb50588f-884ce3d6-4cab4dd2-a54b9815-0100ef07cda4a88c8e5db29a"><ac:plain-text-body><![CDATA[

[[Daconta 2003

AA. Bibliography#Daconta 03]]

Item 7: My Assertions Are Not Gratuitous

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d9a19e284b02323a-33bc9fbb-46464721-93bda4d8-4276877a51930f530a575a3d"><ac:plain-text-body><![CDATA[

[[ESA 2005

AA. Bibliography#ESA 05]]

Rule 68: Explicitly check method parameters for validity, and throw an adequate exception in case they are not valid. Do not use the assert statement for this purpose

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2093cb7c64c5fe5c-2e4c1a2d-470f442f-b8059863-b52e77c49b82a08f5139dded"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

§14.10 The assert Statement

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

...