How to avoid following error - ""user" is checked for null after being dereferenced.". Highlighted code
OLCC olcc = saveOLCCRequest.getOLCC();
if (olcc != null) {
Thanks.
How to avoid following error - ""user" is checked for null after being dereferenced.". Highlighted code
OLCC olcc = saveOLCCRequest.getOLCC();
if (olcc != null) {
Thanks.
Copyright © 2021 Jogjafile Inc.
This is either a bug in the parasoft analyzer, or it has been able to determine that saveOLCCRequest.getOLCC() cannot return null.
It's not possible to say which from the two line snippet you've posted, but if getOLCC() cannot possibly return null then you can remove the warning by removing the null check.