Details

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

        Activity

        Hide
        mbrohl Michael Brohl added a comment -

        Here are the patches for the issues.

        Show
        mbrohl Michael Brohl added a comment - Here are the patches for the issues.
        Hide
        mbrohl Michael Brohl added a comment -

        A revised patch. The business logic had 3 results on a boolean comparison which is not possible. There must be either a null check of the Boolean authResult (which is already done by the service engine because authResult is non-optional) or we can simply use the true/false states.

        Show
        mbrohl Michael Brohl added a comment - A revised patch. The business logic had 3 results on a boolean comparison which is not possible. There must be either a null check of the Boolean authResult (which is already done by the service engine because authResult is non-optional) or we can simply use the true/false states.
        Hide
        mbrohl Michael Brohl added a comment -

        The patch for BillingAccountComparator is in r1801168.
        The patch for GiftCertificateServices is in r1801171.
        The patch for PaymentMethodServices is in r1801183.
        The patch for PaymentGatewayServices is in r1801185.

        Show
        mbrohl Michael Brohl added a comment - The patch for BillingAccountComparator is in r1801168. The patch for GiftCertificateServices is in r1801171. The patch for PaymentMethodServices is in r1801183. The patch for PaymentGatewayServices is in r1801185.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development