diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java index b498259eed..ebb1dd28cf 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java @@ -40,14 +40,14 @@ import org.openecomp.mso.logger.MsoLogger; public class XMLValidator { - private static String XSDS_PATH; + private static String xsdsPath; static { String prefixMsoPropertiesPath = System.getProperty ("mso.config.path"); if (prefixMsoPropertiesPath == null) { prefixMsoPropertiesPath = ""; } - XSDS_PATH = prefixMsoPropertiesPath + "xsds/"; + xsdsPath = prefixMsoPropertiesPath + "xsds/"; } private String stringXsd; @@ -60,12 +60,12 @@ public class XMLValidator { public XMLValidator (String xsdFile) { - try (FileInputStream xsdStream = new FileInputStream (XSDS_PATH + xsdFile)) { + try (FileInputStream xsdStream = new FileInputStream (xsdsPath + xsdFile)) { stringXsd = IOUtils.toString (xsdStream); factory = SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI); - factory.setResourceResolver (new PathResourceResolver (XSDS_PATH)); + factory.setResourceResolver (new PathResourceResolver (xsdsPath)); factory.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true); String quotedXsd = stringXsd.replaceAll (""", "\""); @@ -73,7 +73,7 @@ public class XMLValidator { schema = factory.newSchema (src); } catch (IOException | SAXException e) { - msoLogger.debug ("Cannot open file " + XSDS_PATH + xsdFile, e); + msoLogger.debug ("Cannot open file " + xsdsPath + xsdFile, e); errorMsg = "ErrorDetails: xsd file " + xsdFile + "could not be opened - " + e.getMessage (); } } |