[
https://issues.apache.org/jira/browse/OFBIZ-9705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Leichert updated OFBIZ-9705:
-----------------------------------
Attachment: OFBIZ-9705_org.apache.ofbiz.entity.serialize_bugfixes.patch
Line 134: null instead of known null object, for better visibility
Line 494: added volatile keyword
> [FB] Package org.apache.ofbiz.entity.serialize
> ----------------------------------------------
>
> Key: OFBIZ-9705
> URL: https://issues.apache.org/jira/browse/OFBIZ-9705
> Project: OFBiz
> Issue Type: Sub-task
> Components: ALL APPLICATIONS, ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Julian Leichert
> Priority: Minor
> Attachments:
> OFBIZ-9705_org.apache.ofbiz.entity.serialize_bugfixes.patch
>
>
> XmlSerializer.java:134, NP_LOAD_OF_KNOWN_NULL_VALUE
> - NP: Load of known null value in
> org.apache.ofbiz.entity.serialize.XmlSerializer.serializeSingle(Object,
> Document)
> The variable referenced at this point is known to be null due to an earlier
> check against null. Although this is valid, it might be a mistake (perhaps
> you intended to refer to a different variable, or perhaps the earlier check
> to see if the variable is null should have been a check to see if it was
> non-null).
> XmlSerializer.java:494, LI_LAZY_INIT_STATIC
> - LI: Incorrect lazy initialization of static field
> org.apache.ofbiz.entity.serialize.XmlSerializer.simpleDateFormatter in
> org.apache.ofbiz.entity.serialize.XmlSerializer.getDateFormat()
> This method contains an unsynchronized lazy initialization of a non-volatile
> static field. Because the compiler or processor may reorder instructions,
> threads are not guaranteed to see a completely initialized object, if the
> method can be called by multiple threads. You can make the field volatile to
> correct the problem. For more information, see the Java Memory Model web site.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)