[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
This commit is contained in:
Maria Odea B. Ching 2011-01-28 15:41:06 +00:00
parent fc3b5a9fa1
commit 11f0262cdc
1 changed files with 4 additions and 1 deletions

View File

@ -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();
}