Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Jun 20, 2020
1 parent 3dc96c3 commit 716d155
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main/java/com/anatawa12/fixRtm/asm/config/MainConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,11 @@ object MainConfig {
"cache-with-rhino : the fastest mode but not stable. some script may make error.\n" +
"better-with-nashorn : same runtime as RTM but a little faster than RTM.\n" +
"use-rtm-normal : same as RTM. this is the slowest mode.\n" +
"use-default : use default mode.\n")
"use-default : use default mode. currently use-rtm-normal.\n")

val scriptingMode: ScriptingMode

init {
val cachedScriptsEnabled = config.getCategory(categoryModelLoading).remove("cachedScriptsEnabled")
if (cachedScriptsEnabled != null) { // cachedScriptsEnabledがある
val categoryModelLoadingProp = config.getCategory(categoryModelLoading).get("scriptingMode")!!
if (categoryModelLoadingProp.string.toLowerCase() == ScriptingMode.defaultConfigValue) { // scriptingModeがuse default
if (!cachedScriptsEnabled.boolean) { // cached scriptがdisable
categoryModelLoadingProp.setValue(ScriptingMode.BetterWithNashorn.configValue)
}
}
}
var scriptingMode = ScriptingMode.getByConfigValue(scriptingModeStr.toLowerCase())
if (scriptingMode == null) {
if (scriptingModeStr.toLowerCase() == ScriptingMode.defaultConfigValue) {
Expand Down Expand Up @@ -115,7 +106,7 @@ object MainConfig {

fun getByConfigValue(value: String) = byConfigValue[value]

val default = BetterWithNashorn
val default = UseRtmNormal

const val defaultConfigValue = "use-default"
}
Expand Down

0 comments on commit 716d155

Please sign in to comment.