[
https://issues.apache.org/jira/browse/OFBIZ-9733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Leichert updated OFBIZ-9733:
-----------------------------------
Attachment:
OFBIZ-9733_org.apache.ofbiz.order.thirdparty.paypal_bugfixes.patch
class ExpressCheckoutEvents
- removed redundant null-checks
> [FB] Package org.apache.ofbiz.order.thirdparty.paypal
> -----------------------------------------------------
>
> Key: OFBIZ-9733
> URL: https://issues.apache.org/jira/browse/OFBIZ-9733
> Project: OFBiz
> Issue Type: Sub-task
> Components: order
> Affects Versions: Trunk
> Reporter: Julian Leichert
> Priority: Minor
> Attachments:
> OFBIZ-9733_org.apache.ofbiz.order.thirdparty.paypal_bugfixes.patch
>
>
> ExpressCheckoutEvents.java:94, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of cart, which is known to be non-null in
> org.apache.ofbiz.order.thirdparty.paypal.ExpressCheckoutEvents.expressCheckoutRedirect(HttpServletRequest,
> HttpServletResponse)
> This method contains a redundant check of a known non-null value against the
> constant null.
> ExpressCheckoutEvents.java:214, RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE
> - RCN: Nullcheck of paymentGatewayConfig at line 214 of value previously
> dereferenced in
> org.apache.ofbiz.order.thirdparty.paypal.ExpressCheckoutEvents.determineCheckoutType(Delegator,
> String)
> A value is checked here to see whether it is null, but this value can't be
> null because it was previously dereferenced and if it were null a null
> pointer exception would have occurred at the earlier dereference.
> Essentially, this code and the previous dereference disagree as to whether
> this value is allowed to be null. Either the check is redundant or the
> previous dereference is erroneous.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)