NumberFormat has different result at two instances with the same Confluence v7.1?

Steffen Stamprath
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2020

Is there a bug in confluence? I use this code in scriptrunner:

import java.text.DecimalFormat
import java.text.NumberFormat

def locale = new Locale("de","DE"); //The same with Locale.GERMAN

double doubleValue = 12345.67d
DecimalFormat format = (DecimalFormat)NumberFormat.getNumberInstance(locale)
String formattedValue = format.format(doubleValue); 

It returns on the one Confluence v7.1: 12.345,67 (CORRECT)

And on the other instance (v7.1 too): 12,345.67 (WRONG!)

Both have the same java locale. Whats wrong?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events