Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9450 Fixing defects reported by code analysis tools
  3. OFBIZ-9733

[FB] Package org.apache.ofbiz.order.thirdparty.paypal

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • Trunk
    • 17.12.01
    • order
    • None

    Description

      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.

      Attachments

        Activity

          People

            mbrohl Michael Brohl
            jleichert Julian Leichert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: