Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: rewrote the rule description a bit

Null pointer dereferencing occurs when a variable bound to the null value is treated as if it were a valid object reference and used without checking its state. This condition results  Dereferencing a null pointer results in a NullPointerException, which can in turn result in a denial of service. The denial of service is caused by the exception interrupting the program or thread, and probably causing it to terminate. Termination is likely because catching NullPointerException is forbidden by which interrupts execution of the program or thread. Code conforming to this coding standard will consequently terminate, because ERR08-J. Do not catch NullPointerException or any of its ancestors. Consequently requires that NullPointerException is not caught.  Consequently, code must never dereference null pointers.

...