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

[FB] Package org.apache.ofbiz.accounting.finaccount

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • 17.12.01
    • accounting
    • None
    • Patch

    Description

      The following Bug was found by the FindBugs Software in the OFBiz codebase and may need fixing:

      FinAccountPaymentServices.java:72, RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

      • RCN: Nullcheck of paymentPref at line 72 of value previously dereferenced in org.apache.ofbiz.accounting.finaccount.FinAccountPaymentServices.finAccountPreAuth(DispatchContext, Map)
        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
            Kyra Pritzel-Hentley Kyra Pritzel-Hentley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: