From e21781e58011fefd7bdab13b8a14c4c38643f5bb Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 25 Mar 2023 18:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/script/rhino/RhinoScriptEngine.kt | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/rhino/src/main/java/com/script/rhino/RhinoScriptEngine.kt b/rhino/src/main/java/com/script/rhino/RhinoScriptEngine.kt index a83f75b9f..1319c11d9 100644 --- a/rhino/src/main/java/com/script/rhino/RhinoScriptEngine.kt +++ b/rhino/src/main/java/com/script/rhino/RhinoScriptEngine.kt @@ -74,33 +74,6 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable { return unwrapReturnValue(ret) } - @Throws(ScriptException::class) - override fun eval(reader: Reader, context: ScriptContext): Any? { - val cx = Context.enter() - val ret: Any? - try { - val scope = getRuntimeScope(context) - var filename = this["javax.script.filename"] as? String - filename = filename ?: "" - ret = cx.evaluateReader(scope, reader, filename, 1, null) - } catch (re: RhinoException) { - val line = if (re.lineNumber() == 0) -1 else re.lineNumber() - val msg: String = if (re is JavaScriptException) { - re.value.toString() - } else { - re.toString() - } - val se = ScriptException(msg, re.sourceName(), line) - se.initCause(re) - throw se - } catch (var14: IOException) { - throw ScriptException(var14) - } finally { - Context.exit() - } - return unwrapReturnValue(ret) - } - override fun createBindings(): Bindings { return SimpleBindings() }