https://bz.apache.org/bugzilla/show_bug.cgi?id=68235
Bug ID: 68235 Summary: evaluateInternal(ValueEval,ValueEval,int,int)@IfError does not handle missing arguments Product: POI Version: 5.3.x-dev Hardware: PC Status: NEW Severity: normal Priority: P2 Component: SS Common Assignee: dev@poi.apache.org Reporter: zhong...@pku.org.cn Target Milestone: --- The code is as follows: private static ValueEval EvaluateInternal(ValueEval arg, ValueEval iferror, int srcCellRow, int srcCellCol) { arg = WorkbookEvaluator.DereferenceResult(arg, srcCellRow, srcCellCol); if (arg is ErrorEval) { return iferror; } else { return arg; } } NOPI programmers complain that the above code does not handle missing arguments: https://github.com/nissl-lab/npoi/commit/fa5aab30649ac3344dad34216062cf4dac49efeb Their fixed code is as follows: private static ValueEval EvaluateInternal(ValueEval arg, ValueEval iferror, int... if (arg is ErrorEval) { return iferror; //if the 2nd argument is missing, use an empty string as default if (iferror is MissingArgEval) { return new StringEval(string.Empty); } else { return iferror; } }... } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org