We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If the object doesn't have any discounts the line item object doesn't have a "hasDiscounts" boolean field nor the method returns false.
In order to avoid the issue, I use lineItem.getDiscounts != null where it could be :
lineItem.getDiscounts != null
if(lineItem.hasDiscounts){ //Logic }
Is this the intended behavior or can this be considered into implementation?
The text was updated successfully, but these errors were encountered:
To use in the if condition, it should return a Boolean value, in your case it does not.
Sorry, something went wrong.
Exactly, it always returns a NPE because the object itself doesn't have a field "hasDiscounts".
No branches or pull requests
If the object doesn't have any discounts the line item object doesn't have a "hasDiscounts" boolean field nor the method returns false.
In order to avoid the issue, I use
lineItem.getDiscounts != null
where it could be :
Is this the intended behavior or can this be considered into implementation?
The text was updated successfully, but these errors were encountered: