Methods must not throw RuntimeException
or Exception
. Handling these exceptions requires catching RuntimeException
, which is disallowed by rule ERR14ERR08-J. Do not catch NullPointerException or any of its ancestors. Moreover, throwing a RuntimeException
can lead to subtle errors; for example, a caller cannot examine the exception to determine why it was thrown and consequently cannot attempt recovery.
...
A calling method must also violate rule ERR14ERR08-J. Do not catch NullPointerException or any of its ancestors to determine if the RuntimeException
was thrown.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3cdcc37f3202ea0c-7de66c98-470e42c5-9f02a76c-93fc28e80c269afe4d9c2187"><ac:plain-text-body><![CDATA[ | [[Goetz 2004b | AA. Bibliography#Goetz 04b]] |
| ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b65e9328d8afe125-473338a9-45c1492f-9ccbac5e-fb5c004f37bd16eecf39aa38"><ac:plain-text-body><![CDATA[ | [[Tutorials 2008 | AA. Bibliography#Tutorials 08]] | [Unchecked Exceptions — The Controversy | http://java.sun.com/docs/books/tutorial/essential/exceptions/runtime.html] | ]]></ac:plain-text-body></ac:structured-macro> |
...