File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/formatting Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1616import java .text .DecimalFormatSymbols ;
1717import java .text .NumberFormat ;
1818import java .util .Locale ;
19- import java .util .Locale .Category ;
2019
2120import com .oracle .graal .python .nodes .ErrorMessages ;
2221import com .oracle .graal .python .nodes .PRaiseNode ;
22+ import com .oracle .graal .python .runtime .PythonContext ;
2323import com .oracle .graal .python .runtime .exception .PException ;
24+ import com .oracle .graal .python .runtime .locale .PythonLocale ;
2425import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
2526import com .oracle .truffle .api .nodes .Node ;
2627import com .oracle .truffle .api .strings .TruffleString ;
@@ -212,7 +213,7 @@ public String toString() {
212213 }
213214
214215 protected static DecimalFormat getCurrentDecimalFormat () {
215- Locale currLocale = Locale . getDefault ( Category . FORMAT );
216+ Locale currLocale = PythonContext . get ( null ). getCurrentLocale (). category ( PythonLocale . LC_NUMERIC );
216217 NumberFormat numberFormat = NumberFormat .getInstance (currLocale );
217218 return numberFormat instanceof DecimalFormat ? (DecimalFormat ) numberFormat : null ;
218219 }
You can’t perform that action at this time.
0 commit comments