Skip to content

JavaFX 19+ introduces signature issues with ReactFX #81

@Symeon94

Description

@Symeon94

I'm trying to compile the code with some more recent version of JavaFX (21) and it seems that there are Java syntax problem on the master branch throughout the code.

Methods like this one are failing due compilation:

public interface Val<T>
extends ObservableValue<T>, Observable<Consumer<? super T>> {
    // ...
    default <U> Val<U> flatMap(Function<? super T, ? extends ObservableValue<U>> f) {
        return flatMap(this, f);
    }
    // ...
}

Error reported is:

'flatMap(Function<? super T, ? extends ObservableValue<U>>)' in 'org.reactfx.value.Val' clashes with 'flatMap(Function<? super T, ? extends ObservableValue<? extends U>>)' in 'javafx.beans.value.ObservableValue'; both methods have same erasure, yet neither overrides the other

It clashes with the ObservableValue from JavaFX which now has the following method signature:

    default <U> ObservableValue<U> flatMap(Function<? super T, ? extends ObservableValue<? extends U>> var1) {
        return new FlatMappedBinding(this, var1);
    }

It seems that this was modified in version 19.0.2 of JavaFX

Likely I should use version 18 which does not have the problem, but I wanted to report the issue still.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions