fix displayLanguage representation

This commit is contained in:
Grahame Grieve 2023-08-27 13:27:29 +02:00
parent 333ffc340e
commit b4764afd1f
1 changed files with 2 additions and 3 deletions

View File

@ -51,15 +51,14 @@ public class AcceptLanguageHeader {
@Override
public String toString() {
if (value == 0) {
if (value == 1) {
return lang;
} else {
return lang+"; q="+Double.toString(value);
return lang+"; q="+(String.format("%.6f", value).replaceAll("(\\.\\d+?)0*$", "$1")); //Double.toString(value);
}
}
}
private String source;
private List<LanguagePreference> langs = new ArrayList<>();
private boolean doWildcard;