From 11f0262cdc651496ee03baff1396c3c95d3b08cb Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Fri, 28 Jan 2011 15:41:06 +0000 Subject: [PATCH] [MRM-1453] fixed decimal format to US locale so test wouldn't fail on other locales submitted by Mark Struberg git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1064737 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/archiva/web/action/ShowArtifactAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java index f2d8fa610..ebbd93e63 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java @@ -40,6 +40,7 @@ import org.apache.maven.archiva.repository.RepositoryException; import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -47,6 +48,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; /** @@ -675,7 +677,8 @@ public class ShowArtifactAction } } - size = new DecimalFormat( "#,###.##" ).format( s ) + " " + symbol; + DecimalFormat df = new DecimalFormat( "#,###.##", DecimalFormatSymbols.getInstance( Locale.US) ); + size = df.format( s ) + " " + symbol; id = artifact.getId(); version = artifact.getVersion(); }