XMLWordPrintableJSON

Details

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

    Description

      The following Bugs were found by the FindBugs Software in the OFBiz codebase and may need fixing:

      GeneralLedgerServices.java:42, DLS_DEAD_LOCAL_STORE

      • DLS: Dead store to totalAmountPercentage in org.apache.ofbiz.accounting.ledger.GeneralLedgerServices.createUpdateCostCenter(DispatchContext, Map)
        This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.
        Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      GeneralLedgerServices.java:50, WMI_WRONG_MAP_ITERATOR

      • WMI: org.apache.ofbiz.accounting.ledger.GeneralLedgerServices.createUpdateCostCenter(DispatchContext, Map) makes inefficient use of keySet iterator instead of entrySet iterator
        This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

      GeneralLedgerServices.java:73, WMI_WRONG_MAP_ITERATOR

      • WMI: org.apache.ofbiz.accounting.ledger.GeneralLedgerServices.calculateCostCenterTotal(Map) makes inefficient use of keySet iterator instead of entrySet iterator
        This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

      GeneralLedgerServices.java:75, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

      • RCN: Redundant nullcheck of rowValue, which is known to be non-null in org.apache.ofbiz.accounting.ledger.GeneralLedgerServices.calculateCostCenterTotal(Map)
        This method contains a redundant check of a known non-null value against the constant null.

      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: