On Sat, 27 Jan 2024 15:45:36 GMT, Philippe Altherr <d...@openjdk.org> wrote:
>> 8324797: Code example in JavaDoc of ObservableValue#when doesn't compile > > I have enabled workflows. I have also filed an issue but it looks like this > will go through a review of its own: review ID : 9076496 :-( In retrospect, I > should have added a link to this PR. @paltherr thanks for the change, I hadn't checked the rest of the code so missed the compile error. > modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java > line 275: > >> 273: * For example: >> 274: * <pre>{@code >> 275: * Property<Boolean> condition = new SimpleBooleanProperty(true); > > A better alternative might be to use a `var` like at line 160 and 191. I think it is fine as is, some extra type information, especially in examples, never hurts. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1325#issuecomment-1913267257 PR Review Comment: https://git.openjdk.org/jfx/pull/1325#discussion_r1468538494