Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ shortcut for inserting a null check?

Is there a shortcut for inserting the code:

if (someParameter == null)
   throw NullPointerException("someParameter is null");
like image 426
ripper234 Avatar asked Apr 13 '10 08:04

ripper234


1 Answers

Try typing ifn followed by Tab. You can find more of those or define your own by going to the preferences and searching for "Live Templates".

like image 51
John L. Jegutanis Avatar answered Nov 15 '22 18:11

John L. Jegutanis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!