Fix bug with how the final common properties were being added to the results.

This commit is contained in:
Ann Priestman 2018-09-18 10:15:51 -04:00
parent 388369a4b1
commit 23ebc24e28

View File

@ -212,11 +212,16 @@ final class InterCaseSearchResultsProcessor {
countAndAddCommonAttributes(corValue, resultId);
}
//Add the final instances
CommonAttributeValueList value = new CommonAttributeValueList();
//Add the final instance(s)
if (commonAttributeValue != null) {
int size = commonAttributeValue.getInstanceCount();
if (instanceCollatedCommonFiles.containsKey(size)) {
instanceCollatedCommonFiles.get(size).addMetadataToList(commonAttributeValue);
} else {
CommonAttributeValueList value = new CommonAttributeValueList();
value.addMetadataToList(commonAttributeValue);
instanceCollatedCommonFiles.put(commonAttributeValue.getInstanceCount(), value);
instanceCollatedCommonFiles.put(size, value);
}
}
} catch (SQLException ex) {
LOGGER.log(Level.WARNING, "Error getting artifact instances from database.", ex); // NON-NLS