Is there a shortcut for inserting the code:
if (someParameter == null)
throw NullPointerException("someParameter is null");
Is there a shortcut for inserting the code:
if (someParameter == null)
throw NullPointerException("someParameter is null");
There isn't a template defined for that but you can easily create one. Just follow the steps described here.
If you are okay with having some annotations in your code then you could try the solution mentioned here. It does not solve the problem directly but if you have this kind of null checks at many places you can use this :)