Pattern: Unnecessary null check
Issue: -
Don't apply a null check when a nullable value is accepted.
Example of incorrect code:
f(int? i);
m() {
int? j;
f(j!);
}
Example of correct code:
f(int? i);
m() {
int? j;
f(j);
}
Pattern: Unnecessary null check
Issue: -
Don't apply a null check when a nullable value is accepted.
Example of incorrect code:
f(int? i);
m() {
int? j;
f(j!);
}
Example of correct code:
f(int? i);
m() {
int? j;
f(j);
}