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

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

    XMLWordPrintableJSON

Details

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

    Description

      BillingAccountWorker:

      GiftCertificateServices:

      • Set BigDecimal zero to final to avoid changes by malicious code from the outside or changes that happen by accident from another package.
        ReturnHeaderResp in RefundGcPurchase() is unnecessarily checked for null value.

      PaymentGatewayServices:

      • At two occurrences, an Error is logged which contains the variable processorResult. At that point however processorResult is certain to be null. Remove the variable from the log.
      • Remove unreachable else condition in processAuthResult(). authResult can only be true or false, no third condition needed.

      PaymentMethodServices:

      • Use a StringBuilder to append a certain amount of '*'s to origMaskedNumber. When using concatenation inside the loop, the String is converted to a new StringBuilder, appended to, and then converted back to a String anyway. Therefor the performance is improved by avoiding many StringBuilder initializations.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: