[jira] [Updated] (OFBIZ-9821) [FB] Package org.apache.ofbiz.shipment.verify

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-9821) [FB] Package org.apache.ofbiz.shipment.verify

Nicolas Malin (Jira)

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

Dennis Balkir updated OFBIZ-9821:
---------------------------------
    Attachment: OFBIZ-9821_org.apache.ofbiz.shipment.verify_bugfixes.patch

class VerifyPickSession:
- Line 48: it’s not necessary for the class to implement serialVerisonUID
- Line 229: added a default case to the switch

class VerifyPickSessionRow:
- Line 40: it’s not necessary for the class to implement serialVerisonUID
- Line 47: the field {{orderItem}} is declared as null and has never something different written into it, so its get method will always return null. Is this a mistake?


> [FB] Package org.apache.ofbiz.shipment.verify
> ---------------------------------------------
>
>                 Key: OFBIZ-9821
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9821
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Priority: Minor
>         Attachments: OFBIZ-9821_org.apache.ofbiz.shipment.verify_bugfixes.patch
>
>
> --- VerifyPickSession.java:48, SE_NO_SERIALVERSIONID
> SnVI: org.apache.ofbiz.shipment.verify.VerifyPickSession 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.
> --- VerifyPickSession.java:217, SF_SWITCH_NO_DEFAULT
> SF: Switch statement found in org.apache.ofbiz.shipment.verify.VerifyPickSession.createVerifyPickRow(int, GenericValue, String, String, String, String, String, BigDecimal, Locale) where default case is missing
> This method contains a switch statement where default case is missing. Usually you need to provide a default case.
> Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other cases.
> --- VerifyPickSessionRow.java:-1, UWF_NULL_FIELD
> UwF: Field only ever set to null: org.apache.ofbiz.shipment.verify.VerifyPickSessionRow.orderItem
> All writes to this field are of the constant value null, and thus all reads of the field will return null. Check for errors, or remove it if it is useless.
> --- VerifyPickSessionRow.java:40, SE_NO_SERIALVERSIONID
> SnVI: org.apache.ofbiz.shipment.verify.VerifyPickSessionRow 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)