RFR: 8252546: Move ObservableValue's equality check and lazy evaluation descriptions to @implSpec
Kevin Rushforth
kcr at openjdk.java.net
Fri Sep 11 19:29:18 UTC 2020
On Sun, 30 Aug 2020 16:09:14 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
> Moving implementation details about lazy evaluation and equality checking to `@implSpec`.
I left a couple suggestions below.
modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java line 42:
> 40: * An implementation of {@code ObservableValue} may support lazy evaluation,
> 41: * which means that the value is not immediately recomputed after changes, but
> 42: * lazily the next time the value is requested (see note 1 in {@code implSpec}).
The term "implSpec" doesn't show up in the generated documents, so maybe change it to something like:
see note 1 in the "Implementation Requirements"
modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java line 46:
> 44: * An {@code ObservableValue} generates two types of events: change events and
> 45: * invalidation events. A change event indicates that the value has changed
> 46: * (see note 2 in {@code implSpec}). An invalidation event is generated if the current value is not valid anymore.
Same comment as above.
modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java line 73:
> 71: * <li> All bindings and properties in this library support lazy evaluation.
> 72: * <li> Current implementing classes in JavaFX check for a change using reference
> 73: * equality (and not object equality, {@code Object#equals(Object)}) of the value.
Now that they are right next to each other, it would be good to unify the language of these two requirements, making it
clear that both apply to all JavaFX classes that implement this interface. Perhaps something like:
1. All bindings and properties in the JavaFX library support lazy...
2. All implementing classes in the JavaFX library check for a change...
-------------
PR: https://git.openjdk.java.net/jfx/pull/292
More information about the openjfx-dev
mailing list