kunfei 3 lat temu
rodzic
commit
a0e1011fd2

+ 1 - 1
rhino/src/main/java/com/script/rhino/JavaAdapter.kt

@@ -92,7 +92,7 @@ internal class JavaAdapter private constructor(private val engine: Invocable) :
     companion object {
     companion object {
         @JvmStatic
         @JvmStatic
         @Throws(RhinoException::class)
         @Throws(RhinoException::class)
-        fun init(cx: Context?, scope: Scriptable, sealed: Boolean) {
+        fun init(cx: Context, scope: Scriptable, sealed: Boolean) {
             val topLevel = scope as RhinoTopLevel
             val topLevel = scope as RhinoTopLevel
             val engine: Invocable = topLevel.scriptEngine
             val engine: Invocable = topLevel.scriptEngine
             val obj = JavaAdapter(engine)
             val obj = JavaAdapter(engine)

+ 1 - 1
rhino/src/main/java/com/script/rhino/RhinoTopLevel.kt

@@ -40,7 +40,7 @@ import java.security.AccessControlContext
  * @since 1.6
  * @since 1.6
  */
  */
 @Suppress("UNUSED_PARAMETER")
 @Suppress("UNUSED_PARAMETER")
-class RhinoTopLevel internal constructor(cx: Context?, val scriptEngine: RhinoScriptEngine) :
+class RhinoTopLevel(cx: Context, val scriptEngine: RhinoScriptEngine) :
     ImporterTopLevel(cx, System.getSecurityManager() != null) {
     ImporterTopLevel(cx, System.getSecurityManager() != null) {
 
 
     init {
     init {