|
|
|
|
|
by figglesonrails
5044 days ago
|
|
This is Java code. If you test for a null reference AND THEN dereference it, you get a NullPointerException. The check was supposed to be "!= null". This check is obviously erroneous, and found via SCA. I was saying "if I had a dollar for every time I found this [via SCA] I'd have a lot of money." |
|
Why do you think you are encountering this particular mistake so often? Is it something about your projects, your organization, your colleagues, or Java itself?