ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pranay Pandey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9505) [FB] Package org.apache.ofbiz.accounting.ledger
Date Fri, 21 Jul 2017 10:49:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096127#comment-16096127
] 

Pranay Pandey commented on OFBIZ-9505:
--------------------------------------

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!

> [FB] Package org.apache.ofbiz.accounting.ledger
> -----------------------------------------------
>
>                 Key: OFBIZ-9505
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9505
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Kyra Pritzel-Hentley
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message