From 36b62be84b398044e1feae657c662dba6247782f Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 29 Mar 2018 20:26:02 -0500 Subject: Clean up Sonar results 2 Issue-ID: AAF-206 Change-Id: Ia000b144be58af970f4a5264ca5a9718fdbf9f5d Signed-off-by: Instrumental --- misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc/env/src') diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java b/misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java index 4750b3ef..4dfa26b6 100644 --- a/misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java +++ b/misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java @@ -54,7 +54,7 @@ import org.xml.sax.SAXException; * @param */ public class BaseDataFactory { - + private static final Object LOCK = new Object(); /** * Generate a Schema Object for use in validation based on FileNames. * @@ -88,7 +88,7 @@ public class BaseDataFactory { } try { //Note: SchemaFactory is not reentrant or very thread safe either... see docs - synchronized(XMLConstants.W3C_XML_SCHEMA_NS_URI) { // SchemaFactory is not reentrant + synchronized(LOCK) { // SchemaFactory is not reentrant return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI) .newSchema(sources); } -- cgit 1.2.3-korg