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

Jacques Le Roux edited comment on OFBIZ-9529 at 8/12/17 10:29 AM:
------------------------------------------------------------------

BTW there are also local variables which are declared public, though final. I 
saw a LOT of them in other services classes...


was (Author: jacques.le.roux):
BTW there are also local variables which are declaed public. I saw a LOT of 
them in other services classes...

> [FB] Package org.apache.ofbiz.accounting.payment (Additional Bugs)
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-9529
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9529
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Kyra Pritzel-Hentley
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: 16.11.04
>
>         Attachments: 
> OFBIZ-9529_org.apache.ofbiz.accounting.payment_bugfixes.patch
>
>
> BillingAccountWorker.java:217, SE_NO_SERIALVERSIONID
> * SnVI: 
> org.apache.ofbiz.accounting.payment.BillingAccountWorker$BillingAccountComparator
>  is Serializable; consider declaring a serialVersionUID
> This class implements the Serializable interface, but does not define a 
> serialVersionUID field.  A change as simple as adding a reference to a .class 
> object will add synthetic fields to the class, which will unfortunately 
> change the implicit serialVersionUID (e.g., adding a reference to 
> String.class will generate a static field class$java$lang$String). Also, 
> different source code to bytecode compilers may use different naming 
> conventions for synthetic variables generated for references to class objects 
> or inner classes. To ensure interoperability of Serializable across versions, 
> consider adding an explicit serialVersionUID.
> GiftCertificateServices.java:229, DLS_DEAD_LOCAL_STORE
> * DLS: Dead store to balance in 
> org.apache.ofbiz.accounting.payment.GiftCertificateServices.addFundsToGiftCertificate(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.
> GiftCertificateServices.java:306, DLS_DEAD_LOCAL_STORE
> * DLS: Dead store to balance in 
> org.apache.ofbiz.accounting.payment.GiftCertificateServices.redeemGiftCertificate(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.
> PaymentGatewayServices.java:211, UCF_USELESS_CONTROL_FLOW
> * UCF: Useless control flow in 
> org.apache.ofbiz.accounting.payment.PaymentGatewayServices.authOrderPaymentPreference(DispatchContext,
>  Map)
> This method contains a useless control flow statement, where control flow 
> continues onto the same place regardless of whether or not the branch is 
> taken. 
> PaymentGatewayServices.java:1889, UCF_USELESS_CONTROL_FLOW
> * UCF: Useless control flow in 
> org.apache.ofbiz.accounting.payment.PaymentGatewayServices.processAuthResult(DispatchContext,
>  Map)
> This method contains a useless control flow statement, where control flow 
> continues onto the same place regardless of whether or not the branch is 
> taken. 
> PaymentGatewayServices.java:3729, DLS_DEAD_LOCAL_STORE
> * DLS: Dead store to returnItemResponses in 
> org.apache.ofbiz.accounting.payment.PaymentGatewayServices.isReplacementOrder(GenericValue)
> 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.



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

Reply via email to