[ 
https://issues.apache.org/jira/browse/OFBIZ-9822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Balkir updated OFBIZ-9822:
---------------------------------
    Attachment: 
OFBIZ-9822_org.apache.ofbiz.shipment.weightPackage_bugfixes.patch

class WeightPackageSession:
- Line48: it’s not necessary for the class to implement serialVerisonUID
- Line 306: removed the declaration of  {{actualShippingCost}} because it is 
declared with a different value before its use
- Line 392: removed the declaration of {{diffInShipCostInPerc}} because it is 
declared with a different value before its use
- Line 421: removed the declaration of {{shipmentPackageResult}} because it is 
declared with a different value before its use

class WeightPackageSessionLine:
- Line 34: it’s not necessary for the class to implement serialVerisonUID

> [FB] Package org.apache.ofbiz.shipment.weightPackage
> ----------------------------------------------------
>
>                 Key: OFBIZ-9822
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9822
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>         Attachments: 
> OFBIZ-9822_org.apache.ofbiz.shipment.weightPackage_bugfixes.patch
>
>
> --- WeightPackageSession.java:48, SE_NO_SERIALVERSIONID
> SnVI: org.apache.ofbiz.shipment.weightPackage.WeightPackageSession 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.
> --- WeightPackageSession.java:306, DLS_DEAD_LOCAL_STORE
> DLS: Dead store to actualShippingCost in 
> org.apache.ofbiz.shipment.weightPackage.WeightPackageSession.complete(String, 
> Locale, String)
> 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.
> --- WeightPackageSession.java:392, DLS_DEAD_LOCAL_STORE
> DLS: Dead store to diffInShipCostInPerc in 
> org.apache.ofbiz.shipment.weightPackage.WeightPackageSession.diffInShipCost(BigDecimal)
> 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.
> --- WeightPackageSession.java:421, DLS_DEAD_LOCAL_STORE
> DLS: Dead store to shipmentPackageResult in 
> org.apache.ofbiz.shipment.weightPackage.WeightPackageSession.createPackages(String)
> 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.
> --- WeightPackageSessionLine.java:34, SE_NO_SERIALVERSIONID
> SnVI: org.apache.ofbiz.shipment.weightPackage.WeightPackageSessionLine 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.



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

Reply via email to