Open
Description
In my opinion the first/initial emission of nullSentinel is missing:
ObjectProperty<String> stringProperty = new SimpleObjectProperty<>();
JavaFxObservable.valuesOf(stringProperty, "N/A").subscribe(System.out::println);
stringProperty.set("one");
stringProperty.set(null);
stringProperty.set("two");
Output:
one
N/A
two
I would add "else" block just after "if" at ObservableValueSource:50
if (fxObservable.getValue() != null) {
emitter.onNext(fxObservable.getValue());
} else {
emitter.onNext(nullSentinel);
}
Metadata
Metadata
Assignees
Labels
No labels