Skip to content

Commit

Permalink
fixed arrow test by making Parsers.locale requery Locale.getDefault()…
Browse files Browse the repository at this point in the history
… when no global locale was set.
  • Loading branch information
Jolanrensen committed Nov 22, 2024
1 parent 860a5c2 commit a02b9e6
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ internal object Parsers : GlobalParserOptions {

override var useFastDoubleParser: Boolean = false

override var locale: Locale = Locale.getDefault()
private var _locale: Locale? = null

override var locale: Locale
get() = _locale ?: Locale.getDefault()
set(value) {
_locale = value
}

override fun resetToDefault() {
formatters.clear()
Expand All @@ -159,7 +165,7 @@ internal object Parsers : GlobalParserOptions {
.let { formatters.add(it) }

useFastDoubleParser = false
locale = Locale.getDefault()
_locale = null
nullStrings.addAll(listOf("null", "NULL", "NA", "N/A"))
}

Expand Down

0 comments on commit a02b9e6

Please sign in to comment.