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

[FB] Package org.apache.ofbiz.accounting.thirdparty.authorizedotnet

    XMLWordPrintableJSON

Details

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

    Description

      AIMPaymentServices.java:648: 679: 705: 732: 758, DM_BOOLEAN_CTOR

      • Dm: org.apache.ofbiz.accounting.thirdparty.authorizedotnet.AIMPaymentServices.processAuthTransResult(Map, Map, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
        Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type. Use the Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects instead.

      AuthorizeResponse.java:131, DMI_INVOKING_TOSTRING_ON_ARRAY

      • USELESS_STRING: Invocation of toString on AuthorizeResponse.response in org.apache.ofbiz.accounting.thirdparty.authorizedotnet.AuthorizeResponse.toString()
        The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.

      Attachments

        Activity

          People

            mbrohl Michael Brohl
            Kyra Pritzel-Hentley Kyra Pritzel-Hentley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: