Merge pull request #1173 from rasika/fix-1624

Fixing regression issues for the validations
4.x.x
Kamidu Sachith Punchihewa 7 years ago committed by GitHub
commit 952c1fe28d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -83,7 +83,7 @@ public class PlatformConfigurationManagementServiceImpl
try { try {
resource = ConfigurationManagerUtil.getRegistryResource(resourcePath); resource = ConfigurationManagerUtil.getRegistryResource(resourcePath);
if(resource != null){ if(resource != null){
XMLInputFactory factory = XMLInputFactory.newFactory(); XMLInputFactory factory = XMLInputFactory.newInstance();
factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
XMLStreamReader reader = factory.createXMLStreamReader( XMLStreamReader reader = factory.createXMLStreamReader(

@ -238,7 +238,7 @@ public class DeviceTypeManager implements DeviceManager {
try { try {
resource = DeviceTypeUtils.getRegistryResource(deviceType); resource = DeviceTypeUtils.getRegistryResource(deviceType);
if (resource != null) { if (resource != null) {
XMLInputFactory factory = XMLInputFactory.newFactory(); XMLInputFactory factory = XMLInputFactory.newInstance();
factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
XMLStreamReader reader = factory.createXMLStreamReader( XMLStreamReader reader = factory.createXMLStreamReader(

Loading…
Cancel
Save