Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit 55de73f

Browse files
committed
更新
1 parent a9dbeb3 commit 55de73f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/zhazhapan/util/Calculator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ private static BigDecimal[] calculateInlineFormula(int start, String formula) th
138138
* @throws ScriptException
139139
* 异常
140140
*/
141-
public static double calculateUseEval(String formula) throws ScriptException {
141+
public static Object calculateUseEval(String formula) throws ScriptException {
142142
ScriptEngineManager mgr = new ScriptEngineManager();
143143
ScriptEngine jsEngine = mgr.getEngineByName("JavaScript");
144-
return (double) jsEngine.eval(formula);
144+
return jsEngine.eval(formula);
145145
}
146146

147147
/**

0 commit comments

Comments
 (0)