in apache-rat-core/src/main/java/org/apache/rat/configuration/XMLConfigurationReader.java [569:593]
private void parseApproved(final Node approvedNode) {
if (XMLConfig.FAMILY.equals(approvedNode.getNodeName())) {
try {
Map<String, String> attributes = attributes(approvedNode);
if (attributes.containsKey(XMLConfig.ATT_LICENSE_REF)) {
approvedFamilies.add(attributes.get(XMLConfig.ATT_LICENSE_REF));
} else if (attributes.containsKey(XMLConfig.ATT_ID)) {
ILicenseFamily target = parseFamily(attributes);
if (target != null) {
licenseFamilies.add(target);
String familyCategory = target.getFamilyCategory();
if (StringUtils.isNotBlank(familyCategory)) {
approvedFamilies.add(familyCategory);
}
}
} else {
throw new ConfigurationException(String.format("family tag requires %s or %s attribute",
XMLConfig.ATT_LICENSE_REF, XMLConfig.ATT_ID));
}
} catch (RuntimeException exception) {
DefaultLog.getInstance().error(String.format("Approved error in: '%s'", nodeText(approvedNode)));
throw exception;
}
}
}