summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 20:26:02 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 20:26:11 -0500
commit36b62be84b398044e1feae657c662dba6247782f (patch)
treed537940a473259de2f2d97579607d7cbfa9906d1 /misc
parentd86dd644e1543743cfcbc83b230bd4f2cb2e5d4e (diff)
Clean up Sonar results 2
Issue-ID: AAF-206 Change-Id: Ia000b144be58af970f4a5264ca5a9718fdbf9f5d Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/env/src/main/java/org/onap/aaf/misc/env/BaseDataFactory.java4
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/InXML.java2
2 files changed, 4 insertions, 2 deletions
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 <T>
*/
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);
}
diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/InXML.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/InXML.java
index 51926573..48275926 100644
--- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/InXML.java
+++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/InXML.java
@@ -96,6 +96,8 @@ public class InXML implements Parse<Reader, State> {
sb.append(c);
} else if(c=='&') {
XmlEscape.xmlEscape(sb,r);
+ } else if(c=='\\') {
+ escaped=true;
} else {
switch(c) {
case '<':