in apache-rat-core/src/main/java/org/apache/rat/configuration/XMLConfigurationReader.java [437:461]
private BiPredicate<Node, Description> licenseChildNodeProcessor(final ILicense.Builder builder, final Description description) {
return (child, childDescription) -> {
switch (childDescription.getType()) {
case LICENSE:
throw new ConfigurationException(String.format(
"%s may not be enclosed in another license. %s '%s' found in '%s'", childDescription.getType(),
childDescription.getType(), childDescription.getCommonName(), description.getCommonName()));
case BUILD_PARAMETER:
break;
case MATCHER:
AbstractBuilder b = parseMatcher(child);
callSetter(b.getDescription(), builder, b);
return true;
case PARAMETER:
if (!XMLConfig.isLicenseChild(childDescription.getCommonName())
|| childDescription.getChildType() == String.class) {
callSetter(childDescription, builder, child.getTextContent());
} else {
callSetter(childDescription, builder, parseMatcher(child));
}
return true;
}
return false;
};
}