Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.entity.serialize. (OFBIZ-9705) Thanks Julian Leichert for reporting and providing the patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -69,7 +69,7 @@ import org.xml.sax.SAXException;
|
||||
public class XmlSerializer {
|
||||
public static final String module = XmlSerializer.class.getName();
|
||||
|
||||
private static WeakReference<DateFormat> simpleDateFormatter;
|
||||
private volatile static WeakReference<DateFormat> simpleDateFormatter;
|
||||
|
||||
public static String serialize(Object object) throws SerializeException, FileNotFoundException, IOException {
|
||||
Document document = UtilXml.makeEmptyXmlDocument("ofbiz-ser");
|
||||
@@ -132,7 +132,8 @@ public class XmlSerializer {
|
||||
public static Element serializeSingle(Object object, Document document) throws SerializeException {
|
||||
if (document == null) return null;
|
||||
|
||||
if (object == null) return makeElement("null", object, document);
|
||||
if (object == null)
|
||||
return makeElement("null", null, document);
|
||||
|
||||
// - Standard Objects -
|
||||
if (object instanceof String) {
|
||||
|
||||
Reference in New Issue
Block a user