Overriding and calling super on CustomField#setReadOnly

I’m extending CustomField and trying to add some behavior to setReadOnly(…). I.e. I’m overriding it and then trying to call super.setReadOnly(readOnly). This used to work in Vaadin 23, but since Vaadin 24 the setReadOnly method is provided as default implementation by HasValueAndElement. The error message is Cannot directly invoke the abstract method setReadOnly(boolean) for the type HasValue<AbstractField.ComponentValueChangeEvent<CustomField<V>,V>,V>

~~In theory I should only have to change the super call to HasValueAndElement.super.setReadOnly(readOnly), but then I get No enclosing instance of the type HasValueAndElement<E,V> is accessible in scope. ~~ super.setReadOnly(readOnly) should just work as is.

If I only implement HasValueAndElement (and don’t implement/extend anything else) it works as expected.

I thought that maybe it’s an issue with the Eclipse compiler, but a regular build has the same issue.
Am I just missing something or is this actually a case that Java can’t handle?

Just fyi: you aren’t alone https://github.com/vaadin/flow-components/issues/5650

@lovely-koala Upvoting the issue may help it gain more attention

I did, but since this seems to be an issue of the Eclipse compiler, I wonder how much effort Vaadin will or should put into working around that.

A surprising amount of Vaadin Flow developers use Eclipse.

I have seen, reported, and contributed to issues with “Severity: Major” and “Impact: Low”. They often take some time.

FYI, I created an issue with Eclipse: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1600
That would provide a more permanent solution.