neovim/snippets: Add java negative check
This commit is contained in:
parent
b2636f87fb
commit
c85d860c9a
|
@ -73,6 +73,10 @@ let
|
|||
if (''${1:var} == null) {
|
||||
throw new NullPointerException("$1 can’t be null");
|
||||
}$0'';
|
||||
CheckNegative = mkSnippet "chkneg" "Check for negative numbers" ''
|
||||
if (''${1:var} < 0) {
|
||||
throw new IllegalArgumentException("$1 can’t be negative");
|
||||
}$0'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue