DBZ-5295 Avoid NPE With Xstream emitter

This commit is contained in:
Chris Cranford 2022-07-26 11:05:17 -04:00
parent fe5232dedf
commit 412498db41
No known key found for this signature in database
GPG Key ID: 8B8088D41181D04B

View File

@ -54,9 +54,11 @@ public Operation getOperation() {
private static Object[] getColumnValues(Table table, ColumnValue[] columnValues, Map<String, Object> chunkValues) {
Object[] values = new Object[table.columns().size()];
for (ColumnValue columnValue : columnValues) {
int index = table.columnWithName(columnValue.getColumnName()).position() - 1;
values[index] = columnValue.getColumnData();
if (columnValues != null) {
for (ColumnValue columnValue : columnValues) {
int index = table.columnWithName(columnValue.getColumnName()).position() - 1;
values[index] = columnValue.getColumnData();
}
}
// Overlay chunk values into non-chunk value array