diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt
index ab152e8a4..bc2b8d4b3 100644
--- a/app/src/main/java/io/legado/app/constant/AppConst.kt
+++ b/app/src/main/java/io/legado/app/constant/AppConst.kt
@@ -2,6 +2,7 @@ package io.legado.app.constant
import io.legado.app.App
import io.legado.app.R
+import javax.script.ScriptEngine
import javax.script.ScriptEngineManager
object AppConst {
@@ -14,7 +15,7 @@ object AppConst {
const val userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.2357.134 Safari/537.36"
- val SCRIPT_ENGINE = ScriptEngineManager().getEngineByName("rhino")
+ val SCRIPT_ENGINE: ScriptEngine = ScriptEngineManager().getEngineByName("rhino")
val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available)
diff --git a/app/src/main/java/io/legado/app/constant/Pattern.kt b/app/src/main/java/io/legado/app/constant/Pattern.kt
index 917f4d52e..fd623bf69 100644
--- a/app/src/main/java/io/legado/app/constant/Pattern.kt
+++ b/app/src/main/java/io/legado/app/constant/Pattern.kt
@@ -3,6 +3,6 @@ package io.legado.app.constant
import java.util.regex.Pattern
object Pattern {
- val JS_PATTERN = Pattern.compile("([\\w\\W]*?|@js:[\\w\\W]*$)", Pattern.CASE_INSENSITIVE)
- val EXP_PATTERN = Pattern.compile("\\{\\{([\\w\\W]*?)\\}\\}")
+ val JS_PATTERN: Pattern = Pattern.compile("([\\w\\W]*?|@js:[\\w\\W]*$)", Pattern.CASE_INSENSITIVE)
+ val EXP_PATTERN: Pattern = Pattern.compile("\\{\\{([\\w\\W]*?)\\}\\}")
}
\ No newline at end of file