Flow: Vaadin flow 14.0.13 compile error with openjdk 13

Created on 29 Mar 2020  路  3Comments  路  Source: vaadin/flow

Only use GitHub issues for bugs and feature requests.
For general support from the community, see https://vaadin.com/forum or https://gitter.im/vaadin/flow

NOTE: Issues concerning certain component should go to the corresponding components repository.

To make sure we can quickly validate and fix the bug, please provide as much as possible of the following information:

  • Description of the bug -> compile errror

_Error:java: getEmptyValue() in com.vaadin.flow.component.AbstractField cannot implement getEmptyValue() in com.vaadin.flow.component.HasValue
return type capture#1 of ? is not compatible with capture#2 of ?_

  • Minimal reproducible example -> the same at compile time
  • Expected behavior .> deploy my app
  • Actual behavior -> compile error

Error:java: getEmptyValue() in com.vaadin.flow.component.AbstractField cannot implement getEmptyValue() in com.vaadin.flow.component.HasValue
return type capture#1 of ? is not compatible with capture#2 of ?

  • Versions:

    • Vaadin / Flow version -> 14.0.13

    • Java version open jdk 13

    • OS version windows 10

    • Browser version (if applicable) NONE

compilerror

High Blocker bug

All 3 comments

Dear community member @rucko24,

First of all thank you for taking time on reporting this issue about Vaadin Flow.
Although it might work with few to no issues using other Java SDK's, we recommend running Vaadin projects on Java versions 8 and 11, since these are the version that we officially support. Furthermore, we also recommend using an up-to-date version of the Vaadin platform, like 14.1.
We've been unsuccessful on reproducing the reported issue. We kindly ask you that if you still face this problem when running your project in the conditions described above, please let us know. Also, if you could provide the source code for this project, it would help us tackle this issue faster and better.
As this seems to be a not recurring issue, and no further reports of this have surfaced, we'll be closing this issue for now, until we get back from you.

Feel free to report back to us on this.

Hi, check _MainView.class_ please! take this simple proyect, based on.

https://github.com/vaadin/skeleton-starter-flow-spring/tree/master

It throws me the same exception, and from what I see is when the NumberField is added in the Stream along with other AbstractFields

If I remove the NumberFied from that Stream, the exception does not occur.

Tested with
Open jdk 11
Vaadin 15
So Ubuntu 64bits

    protected final NumberField grasaCorporal = new NumberField();
    protected final NumberField numberField = new NumberField();
    protected final ComboBox<String> actividadFisica = new ComboBox<>();
    protected final ComboBox<String> genero = new ComboBox<>();
    private final RadioButtonGroup<String> sRadioButton = new RadioButtonGroup<>();
    private final TextField textField = new TextField();

    public MainView(@Autowired GreetService service) {

        Stream.of(textField,sRadioButton, numberField).forEach(e -> {
            e.setVisible(true);
            numberField.getEmptyValue();
        });

    }

skeleton-starter-flow-spring-bug-numberField.zip

It seems the problem is in type inference on Stream.of.

If you change your code as following there's no compilation error

Stream.<Component>of(textField, sRadioButton, numberField).forEach(e -> { 
            e.setVisible(true);
            numberField.getEmptyValue();
        });
Was this page helpful?
0 / 5 - 0 ratings