I\'d like to use the @NonNull annotation in Android, but I can\'t figure out just the right way to do it.
I propose you this example:
public voi
You can use the comment-style suppression to disable that specific null check warning, e.g.:
public MyMethod(@NonNull Context pContext) {
//noinspection ConstantConditions
if (pContext == null) {
throw new IllegalArgumentException();
}
...
}
You'll need that //noinspection ConstantConditions every time you do it.