[
https://issues.apache.org/jira/browse/OFBIZ-9808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Brohl closed OFBIZ-9808.
--------------------------------
Resolution: Implemented
Fix Version/s: Upcoming Release
Thanks Julian,
your patch is in trunk r1817651.
> [FB] Package org.apache.ofbiz.shipment.packing
> ----------------------------------------------
>
> Key: OFBIZ-9808
> URL: https://issues.apache.org/jira/browse/OFBIZ-9808
> Project: OFBiz
> Issue Type: Sub-task
> Components: ALL APPLICATIONS, ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Julian Leichert
> Assignee: Michael Brohl
> Priority: Minor
> Fix For: Upcoming Release
>
> Attachments:
> OFBIZ-9808_org.apache.ofbiz.shipment.packing_bugfixes.patch
>
>
> PackingServices.java:149, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of packages, which is known to be non-null in
> org.apache.ofbiz.shipment.packing.PackingServices.packBulk(DispatchContext,
> Map)
> This method contains a redundant check of a known non-null value against the
> constant null.
> PackingSession.java:-1, SE_BAD_FIELD
> - Se: Class org.apache.ofbiz.shipment.packing.PackingSession defines
> non-transient non-serializable instance field itemInfos
> This Serializable class defines a non-primitive instance field which is
> neither transient, Serializable, or java.lang.Object, and does not appear to
> implement the Externalizable interface or the readObject() and writeObject()
> methods. Objects of this class will not be deserialized correctly if a
> non-Serializable object is stored in this field.
> PackingSession.java:52, SE_NO_SERIALVERSIONID
> - SnVI: org.apache.ofbiz.shipment.packing.PackingSession 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.
> PackingSession.java:173, SF_SWITCH_NO_DEFAULT
> - SF: Switch statement found in
> org.apache.ofbiz.shipment.packing.PackingSession.addOrIncreaseLine(String,
> String, String, String, BigDecimal, int, BigDecimal, boolean) 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.
> PackingSession.java:228, SF_SWITCH_NO_DEFAULT
> - SF: Switch statement found in
> org.apache.ofbiz.shipment.packing.PackingSession.createPackLineItem(int,
> GenericValue, String, String, String, String, BigDecimal, BigDecimal, int)
> 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.
> PackingSession.java:1019, SIC_INNER_SHOULD_BE_STATIC
> - SIC: Should org.apache.ofbiz.shipment.packing.PackingSession$ItemDisplay be
> a _static_ inner class?
> This class is an inner class, but does not use its embedded reference to the
> object which created it. This reference makes the instances of the class
> larger, and may keep the reference to the creator object alive longer than
> necessary. If possible, the class should be made static.
> PackingSessionLine.java:37, SE_NO_SERIALVERSIONID
> - SnVI: org.apache.ofbiz.shipment.packing.PackingSessionLine 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)