Skip to content

Instantly share code, notes, and snippets.

@findepi
Last active June 25, 2024 17:35
Show Gist options
  • 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 Java
  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

@ssheikin
Copy link

ssheikin commented Jun 25, 2024

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