diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-03-01 10:57:33 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-03-22 12:37:49 +0100 |
commit | 169ffd14e1e2510b5fe6845577678b00f56ff9eb (patch) | |
tree | 30151e0a55bd4f4f5f7d421a934fb16752a65787 | |
parent | 8d3059a3f0b2d64261b44a55189348f0f54e7da8 (diff) | |
download | sonarqube-169ffd14e1e2510b5fe6845577678b00f56ff9eb.tar.gz sonarqube-169ffd14e1e2510b5fe6845577678b00f56ff9eb.zip |
SONAR-10266 percentage number format must not be locale sensitive
but hardcoded to English Locale
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgFormatter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgFormatter.java b/server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgFormatter.java index e75911dd9cb..dfad1ab0b4e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgFormatter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/badge/ws/SvgFormatter.java @@ -20,6 +20,7 @@ package org.sonar.server.badge.ws; import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.Locale; @@ -34,7 +35,7 @@ class SvgFormatter { private static final String NUMERIC_SUFFIX_LIST = " kmbt"; private static final String NUMERIC_REGEXP = "\\.[0-9]+"; - private static final DecimalFormat PERCENT_FORMATTER = new DecimalFormat("#.#"); + private static final DecimalFormat PERCENT_FORMATTER = new DecimalFormat("#.#", DecimalFormatSymbols.getInstance(Locale.ENGLISH)); private static final String DURATION_MINUTES_FORMAT = "%smin"; private static final String DURATION_HOURS_FORMAT = "%sh"; |