Vaadin 8. Why there are different decimal formats in Grid and TextField wit

Can’t find the reason why representation of decimal numbers is different in Grid and TextField with StringToDoubleConverter.

For “ru” locale Grid uses “.” separator, and TextField uses “,”.

Vaadin version is 8.10.3.

Code:

package org.test;

import com.vaadin.annotations.Theme;
import com.vaadin.data.Binder;
import com.vaadin.data.converter.StringToDoubleConverter;
import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.*;

import java.text.DecimalFormat;
import java.util.Collections;
import java.util.Locale;

@Theme("mytheme")
public class MyUI extends UI {

    private final Binder<SourceBean> binder = new Binder<>(SourceBean.class);

    private TextArea debugArea;
    private Grid<SourceBean> grid;
    private TextField textField;

    @Override
    protected void init(VaadinRequest vaadinRequest) {
        UI.getCurrent().setLocale(Locale.forLanguageTag("ru"));

        SourceBean sourceBean = new SourceBean();
        sourceBean.setValue(11.11);

        debugArea = new TextArea("Locales");
        debugArea.setWidthFull();
        debugArea.setHeight("300px");

        grid = new Grid<>("Grid");
        grid.setWidthFull();
        grid.setHeight("100px");

        grid.addColumn(SourceBean::getValue)
            .setId("value")
            .setWidth(150);

        grid.setDataProvider(
            new ListDataProvider<>(
                Collections.singleton(sourceBean)
            )
        );

        textField = new TextField("TextField");
        textField.setSizeFull();

        binder.forField(textField)
            .withNullRepresentation("")
            .withConverter(new StringToDoubleConverter("Converter error"))
            .bind(SourceBean::getValue, SourceBean::setValue);

        binder.addValueChangeListener(event -> {
            debugArea.setValue(getDebugData());
            binder.validate();
        });

        binder.setBean(sourceBean);

        setContent(new VerticalLayout(
            textField
            , grid
            , debugArea
        ));
    }

    public String getDebugData() {
        Locale sessionLocale = getSession() != null
            ? getSession().getLocale()
            : null;

        final Locale uiLocale = UI.getCurrent().getLocale();
        DecimalFormat decimalFormat = (DecimalFormat) DecimalFormat.getInstance(uiLocale);
        char decimalSeparator = decimalFormat.getDecimalFormatSymbols().getDecimalSeparator();
        return
            "sessionLocale: " + sessionLocale +
            " \nUI locale: " + uiLocale +
            " \ndecimalFormat pattern: " + decimalFormat.toPattern() +
            " \ndecimalFormat localized pattern: " + decimalFormat.toLocalizedPattern() +
            " \ndecimalSeparator: \"" + decimalSeparator + "\"" +
            " \nGrid locale: " + grid.getLocale() +
            " \nTextField locale: " + textField.getLocale();
    }
}

public class SourceBean {
    private Double value;

    public Double getValue() {
        return value;
    }

    public void setValue(Double value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "SourceBean{" +
            "value=" + value +
            '}';
    }
}

How it looks you can see in the attachment.

18451536.jpeg