Skip to content

Instantly share code, notes, and snippets.

@findepi
Last active December 31, 2021 16:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save findepi/b597d2bc91e5a30c2a44fd65fe252f0b to your computer and use it in GitHub Desktop.
Save findepi/b597d2bc91e5a30c2a44fd65fe252f0b to your computer and use it in GitHub Desktop.
  1. Intellij Preferences > Live Templates > group other
  2. Add a new one with
    • abbreviation rnn
    • Description requireNonNull
    • Template text java.util.Objects.requireNonNull($var$, "$var$ is null")
    • Applicable contexts: Java > Expression
    • check use static imports if possible
    • Edit variables button and there add var variable with variableOfType("Object") expression
@findepi
Copy link
Author

findepi commented Sep 17, 2019

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment