NPE in formula transform evaluating null integer or numeric value
@@ -69,6 +69,7 @@ public class FormulaParser {
int fieldPosition = rowMeta.indexOfValue(formulaField);
IValueMeta fieldMeta = rowMeta.getValueMeta(fieldPosition);
+ if (dataRow[fieldPosition] != null) {
if (fieldMeta.isBoolean()) {
cell.setCellValue((Boolean) dataRow[fieldPosition]);
} else if (fieldMeta.isBigNumber()) {
@@ -86,6 +87,7 @@ public class FormulaParser {
} else {
cell.setCellValue((String) dataRow[fieldPosition]);
}
+ }
parsedFormula = parsedFormula.replaceAll("\\[" + formulaField + "\\]", s + "1");
fieldIndex++;
