Skip to content

i18n setter (and others) does not follow Java practices #1677

Description

@tmattsso

In Java, you can store a reference to an object to use it later. The Vaadin 8 component APIs use this to good effect. But for platform, there are setters like this:

    public void setI18n(LoginI18n i18n) {
        getElement().setPropertyJson("i18n", JsonSerializer.toJson(i18n));
    }

Suddenly, it matter in which order you call methods, when it didn't earlier. Also, storing a reference to the i18n object to change error messages later on now won't work. This is incredibly confusing for Java developers, especially since previous framework versions do things according to standard Java practices.

Whenever possible, you should adhere to standard Java practices when creating an API for Java users.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions