We can just
throw null;
in java, but probably not a good idea for most case http://beanman.wordpress.com/2007/04/20/throwing-null-with-different-jvm-options/