The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in NumberFormat.getNumberInstance with GERMAN Format

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 Champions.
January 21, 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 confluence 6.14.2: 12.345,67 (CORRECT)

And in Confluence 7.0.4: 12,345.67 (WRONG!)

Both have the same java locale. Whats wrong?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
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 Champions.
February 26, 2020

okay, now both systems on the same version (Confluence 7.1). But the same Problem.

Anybody an idea?

0 votes
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 Champions.
January 23, 2020

ok, Upgrade auf Confluence +7.1 fixed it.

0 votes
JP _AC Bielefeld Leader_
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 Champions.
January 21, 2020

Hi,

what Confluence version are you using? 7.4 is not released. Latest is 7.2.1.

Best

JP

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 Champions.
January 22, 2020

Sorry, I mean: 7.0.4

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events