Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • Component/s: accounting
    • Labels:
      None
    • Flags:
      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.

        Activity

        Hide
        pandeypranay Pranay Pandey added a comment -

        Hello Kyra Pritzel-Hentley,

        Thanks for reporting the issue. Please put a clear summary of the issue in ticket summary and provide steps to regenerate the issue in the description. Both of these details are very important in tracking down the issue. It's also required even if you are going to provide a patch for fixing the reported issue.

        It's recommended study for every OFBiz contributor - https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtoContributetoOFBiz

        Thanks!

        Show
        pandeypranay Pranay Pandey added a comment - Hello Kyra Pritzel-Hentley, Thanks for reporting the issue. Please put a clear summary of the issue in ticket summary and provide steps to regenerate the issue in the description. Both of these details are very important in tracking down the issue. It's also required even if you are going to provide a patch for fixing the reported issue. It's recommended study for every OFBiz contributor - https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtoContributetoOFBiz Thanks!
        Hide
        Kyra Pritzel-Hentley Kyra Pritzel-Hentley added a comment -

        This patch resolves the bug.

        Show
        Kyra Pritzel-Hentley Kyra Pritzel-Hentley added a comment - This patch resolves the bug.
        Hide
        mbrohl Michael Brohl added a comment -

        Thanks Kyra,

        your patch is in trunk r1805463.

        Show
        mbrohl Michael Brohl added a comment - Thanks Kyra, your patch is in trunk r1805463.

          People

          • Assignee:
            mbrohl Michael Brohl
            Reporter:
            Kyra Pritzel-Hentley Kyra Pritzel-Hentley
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development