Versions Compared

Key

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

Wiki Markup
            Never use assertions to validate arguments of public methods. According to the _Java Language Specification_ , [§14.10, "The {{assert}} Statement"|http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.10] \[[JLS 2005|AA. Bibliography#JLS 05]\]:

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3af8bad893d09162-c2017dcc-4e1e45d2-8f218478-0fc17736d955b82638aa1daf"><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="f86b5bf9398c9f37-54d1d8cb-461c4d57-8b0e9dfa-c9c4c4d2be31816aceacdeb0"><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="4afd9bf86a5f94c0-a14078d3-42164c29-bdaa96ac-42afd17bbaf5d73a8fd98deb"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

§14.10, The assert Statement

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

...