public static String getStandardDeviationString(double[] standardDeviationDoubles) {
        if (standardDeviationDoubles == null) {
            return null;
        }
        StringBuilder standardDeviationString = new StringBuilder(standardDeviationDoubles.length * 9);
        // Abbreviate to 2 decimals
        // We don't use a local sensitive DecimalFormat, because other Scores don't use it either (see PLANNER-169)
        DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols(Locale.US);
        DecimalFormat exponentialFormat = new DecimalFormat("0.0#E0", decimalFormatSymbols);
        DecimalFormat decimalFormat = new DecimalFormat("0.0#", decimalFormatSymbols);
        boolean first = true;
        for (double standardDeviationDouble : standardDeviationDoubles) {
            if (first) {
                first = false;
            } else {
                standardDeviationString.append("/");
            }
            // See http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#toString%28double%29
            String abbreviated;
            if (0.001 <= standardDeviationDouble && standardDeviationDouble <= 10000000.0) {
                abbreviated = decimalFormat.format(standardDeviationDouble);
            } else {
                abbreviated = exponentialFormat.format(standardDeviationDouble);
            }
            standardDeviationString.append(abbreviated);
        }
        return standardDeviationString.toString();
    }
public static String getStandardDeviationString(double[] standardDeviationDoubles) {
        if (standardDeviationDoubles == null) {
            return null;
        }
        StringBuilder standardDeviationString = new StringBuilder(standardDeviationDoubles.length * 9);
        
        
        DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols(Locale.US);
        DecimalFormat exponentialFormat = new DecimalFormat("0.0#E0", decimalFormatSymbols);
        DecimalFormat decimalFormat = new DecimalFormat("0.0#", decimalFormatSymbols);
        boolean first = true;
        for (double standardDeviationDouble : standardDeviationDoubles) {
            if (first) {
                first = false;
            } else {
                standardDeviationString.append("/");
            }
            
            String abbreviated;
            if (0.001 <= standardDeviationDouble && standardDeviationDouble <= 10000000.0) {
                abbreviated = decimalFormat.format(standardDeviationDouble);
            } else {
                abbreviated = exponentialFormat.format(standardDeviationDouble);
            }
            standardDeviationString.append(abbreviated);
        }
        return standardDeviationString.toString();
    }
public static String getStandardDeviationString ( double [ ] standardDeviationDoubles ) { if ( standardDeviationDoubles == null ) { return null ; } StringBuilder standardDeviationString = new StringBuilder ( standardDeviationDoubles . length * 9 ) ; // Abbreviate to 2 decimals // We don't use a local sensitive DecimalFormat, because other Scores don't use it either (see PLANNER-169) DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols ( Locale . US ) ; DecimalFormat exponentialFormat = new DecimalFormat ( "0.0#E0" , decimalFormatSymbols ) ; DecimalFormat decimalFormat = new DecimalFormat ( "0.0#" , decimalFormatSymbols ) ; boolean first = true ; for ( double standardDeviationDouble : standardDeviationDoubles ) { if ( first ) { first = false ; } else { standardDeviationString . append ( "/" ) ; } // See http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#toString%28double%29 String abbreviated ; if ( 0.001 <= standardDeviationDouble && standardDeviationDouble <= 10000000.0 ) { abbreviated = decimalFormat . format ( standardDeviationDouble ) ; } else { abbreviated = exponentialFormat . format ( standardDeviationDouble ) ; } standardDeviationString . append ( abbreviated ) ; } return standardDeviationString . toString ( ) ; }
TODO Do the locale formatting in benchmarkReport.html.ftl - https://issues.jboss.org/browse/PLANNER-169
TODO Do the locale formatting in benchmarkReport . html . ftl - https : // issues . jboss . org / browse / PLANNER - 169