You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ProcessPaymentServlet.java at line 48, there is the possibility of hitting a null pointer reference. Line 46 has a condition to check != null how ever that condition does not cover the for loop of the cartItem list. The If condition (line 46) needs to cover the entire for loop starting at line 48.
Expected behavior
list does not hit null reference when iterating the loop at checkout
Actual behavior
list hits null reference and an error is thrown.
Possible fix
The If condition (line 46) needs to cover the entire for loop starting at line 48.
Steps to reproduce
In ProcessPaymentServlet.java at line 48, there is the possibility of hitting a null pointer reference. Line 46 has a condition to check != null how ever that condition does not cover the for loop of the cartItem list. The If condition (line 46) needs to cover the entire for loop starting at line 48.
Context
Was doing code review and running find bugs on the code
Additional information
No response
The text was updated successfully, but these errors were encountered:
Description
In ProcessPaymentServlet.java at line 48, there is the possibility of hitting a null pointer reference. Line 46 has a condition to check != null how ever that condition does not cover the for loop of the cartItem list. The If condition (line 46) needs to cover the entire for loop starting at line 48.
Expected behavior
list does not hit null reference when iterating the loop at checkout
Actual behavior
list hits null reference and an error is thrown.
Possible fix
The If condition (line 46) needs to cover the entire for loop starting at line 48.
Steps to reproduce
In ProcessPaymentServlet.java at line 48, there is the possibility of hitting a null pointer reference. Line 46 has a condition to check != null how ever that condition does not cover the for loop of the cartItem list. The If condition (line 46) needs to cover the entire for loop starting at line 48.
Context
Was doing code review and running find bugs on the code
Additional information
No response
The text was updated successfully, but these errors were encountered: