Browse Source

REPORT-65192 公式合法性检测错误字符位置返回不正确

1.处理一下极少出现的情况,默认返回0的位置吧。
bugfix/11.0
Hoky 3 years ago
parent
commit
7b0715e3b1
  1. 4
      designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java

4
designer-base/src/main/java/com/fr/design/formula/exception/function/FormulaCheckWrongFunction.java

@ -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);
}
}

Loading…
Cancel
Save