Skip to content

Commit 916a2ef

Browse files
hubertpjdunkerley
authored andcommitted
Workaround NI on MacOS issues with NaN formatting (#14572)
`DecimalFormat` suddenly decided to format Double.NaN as `U+FFFD REPLACEMENT CHARACTER` (or `?`) on MacOS in NI mode. There were no changes to the underlying code or configs so it's a bit of a mystery why it started now when it worked before. Setting explicitly the name in `DecimalFormatSymbols` does the job, because modifying reflection configs for NI didn't help. (cherry picked from commit 4eead99)
1 parent 18cb76e commit 916a2ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std-bits/table/src/main/java/org/enso/table/formatting/DecimalFormatter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public DecimalFormatter(String thousandSeparator, String decimalPoint) {
3131
}
3232

3333
symbols.setInfinity(INFINITY);
34+
symbols.setNaN("NaN");
3435
decimalFormat.setDecimalFormatSymbols(symbols);
3536
decimalFormat.setDecimalSeparatorAlwaysShown(true);
3637
decimalFormat.setMaximumFractionDigits(Integer.MAX_VALUE);

0 commit comments

Comments
 (0)