Skip empty strings as values in the schema

This commit is contained in:
Antonin Delpeuch 2018-01-11 10:17:00 +00:00
parent bf7000e601
commit 6c6151ca43

View File

@ -24,7 +24,7 @@ public class WbStringVariable extends WbStringExpr {
public StringValue evaluate(ExpressionContext ctxt) public StringValue evaluate(ExpressionContext ctxt)
throws SkipSchemaExpressionException { throws SkipSchemaExpressionException {
Cell cell = ctxt.getCellByName(columnName); Cell cell = ctxt.getCellByName(columnName);
if (cell != null) { if (cell != null && !cell.value.toString().isEmpty()) {
return Datamodel.makeStringValue(cell.value.toString()); return Datamodel.makeStringValue(cell.value.toString());
} }
throw new SkipSchemaExpressionException(); throw new SkipSchemaExpressionException();