Commit 1a0b8005 by Nepxion

修正规则XML解析的小Bug

parent 57b7b9a1
......@@ -166,6 +166,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
if (childElementObject instanceof Element) {
Element childElement = (Element) childElementObject;
if (StringUtils.equals(childElement.getName(), ConfigConstant.SERVICE_ELEMENT_NAME)) {
Attribute serviceNameAttribute = childElement.attribute(ConfigConstant.SERVICE_NAME_ATTRIBUTE_NAME);
if (serviceNameAttribute == null) {
throw new PluginException("Attribute[" + ConfigConstant.SERVICE_NAME_ATTRIBUTE_NAME + "] in element[" + childElement.getName() + "] is missing");
......@@ -181,6 +182,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
filterMap.put(serviceName, filterValueList);
}
}
}
filterHolderEntity.setFilterEntity(filterEntity);
}
......@@ -214,6 +216,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
if (childElementObject instanceof Element) {
Element childElement = (Element) childElementObject;
if (StringUtils.equals(childElement.getName(), ConfigConstant.SERVICE_ELEMENT_NAME)) {
Attribute serviceNameAttribute = childElement.attribute(ConfigConstant.SERVICE_NAME_ATTRIBUTE_NAME);
if (serviceNameAttribute == null) {
throw new PluginException("Attribute[" + ConfigConstant.SERVICE_NAME_ATTRIBUTE_NAME + "] in element[" + childElement.getName() + "] is missing");
......@@ -236,6 +239,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
filterMap.put(serviceName, value);
}
}
}
registerEntity.setCountEntity(countEntity);
}
......@@ -255,6 +259,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
if (childElementObject instanceof Element) {
Element childElement = (Element) childElementObject;
if (StringUtils.equals(childElement.getName(), ConfigConstant.SERVICE_ELEMENT_NAME)) {
DiscoveryServiceEntity serviceEntity = new DiscoveryServiceEntity();
Attribute consumerServiceNameAttribute = childElement.attribute(ConfigConstant.CONSUMER_SERVICE_NAME_ATTRIBUTE_NAME);
......@@ -294,6 +299,7 @@ public class ConfigParser extends Dom4JParser implements PluginConfigParser {
serviceEntityList.add(serviceEntity);
}
}
}
discoveryEntity.setVersionEntity(versionEntity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment