xstream.useAttributeFor(InternalRule.class, "merger");
List<InternalRule> rules = new ArrayList<InternalRule>();
if (getConfigLocation() != null) {
InternalRules internalRules = (InternalRules) xstream.fromXML(getConfigLocation()
.getInputStream());
if (!CollectionUtils.isEmpty(internalRules.getRules())) {
rules.addAll(internalRules.getRules());
}
}
if (getConfigLocations() != null && getConfigLocations().length > 0) {
for (Resource resource : getConfigLocations()) {
InternalRules internalRules = (InternalRules) xstream.fromXML(resource
.getInputStream());
if (!CollectionUtils.isEmpty(internalRules.getRules())) {
rules.addAll(internalRules.getRules());
}
}
}
return rules;