Fixed processing output records (those without errors aren't present in map)

This commit is contained in:
2023-05-10 17:40:07 -05:00
parent d6acb0c1ef
commit 1121dc14d4

View File

@ -123,12 +123,12 @@ public class BulkDeleteLoadStep extends LoadViaDeleteStep implements ProcessSumm
Serializable recordPrimaryKey = record.getValue(primaryKeyFieldName); Serializable recordPrimaryKey = record.getValue(primaryKeyFieldName);
QRecord outputRecord = outputRecordMap.get(recordPrimaryKey); QRecord outputRecord = outputRecordMap.get(recordPrimaryKey);
if(CollectionUtils.nullSafeHasContents(outputRecord.getErrors())) if(outputRecord != null && CollectionUtils.nullSafeHasContents(outputRecord.getErrors()))
{ {
String message = outputRecord.getErrors().get(0).getMessage(); String message = outputRecord.getErrors().get(0).getMessage();
processSummaryWarningsAndErrorsRollup.addError(message, recordPrimaryKey); processSummaryWarningsAndErrorsRollup.addError(message, recordPrimaryKey);
} }
else if(CollectionUtils.nullSafeHasContents(outputRecord.getWarnings())) else if(outputRecord != null && CollectionUtils.nullSafeHasContents(outputRecord.getWarnings()))
{ {
String message = outputRecord.getWarnings().get(0).getMessage(); String message = outputRecord.getWarnings().get(0).getMessage();
processSummaryWarningsAndErrorsRollup.addWarning(message, recordPrimaryKey); processSummaryWarningsAndErrorsRollup.addWarning(message, recordPrimaryKey);