Fix String.format to use Locale.ROOT in RestRecoveryAction

This commit is contained in:
Igor Motov 2013-10-28 23:37:11 -04:00
parent 5d90abf701
commit 01d51ef434
1 changed files with 2 additions and 5 deletions

View File

@ -34,10 +34,7 @@ import org.elasticsearch.rest.*;
import org.elasticsearch.rest.action.support.RestTable; import org.elasticsearch.rest.action.support.RestTable;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.*;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import static org.elasticsearch.rest.RestRequest.Method.GET; import static org.elasticsearch.rest.RestRequest.Method.GET;
@ -137,7 +134,7 @@ public class RestRecoveryAction extends BaseRestHandler {
if (primarySize == null) { if (primarySize == null) {
t.addCell("NaN"); t.addCell("NaN");
} else { } else {
t.addCell(String.format("%1.1f%%", 100.0 * (float)replicaSize / primarySize)); t.addCell(String.format(Locale.ROOT, "%1.1f%%", 100.0 * (float)replicaSize / primarySize));
} }
t.endRow(); t.endRow();
} }