1.处理一下极少出现的情况,默认返回0的位置吧。
@ -73,6 +73,8 @@ public class FormulaCheckWrongFunction implements Function<Exception, FormulaChe
if (invalidFormula.contains(",")) {
invalidFormula = invalidFormula.substring(0, invalidFormula.indexOf(","));
}
return formulaText.indexOf(invalidFormula);
int index = formulaText.indexOf(invalidFormula);
return Math.max(index, 0);