RFR: JDK-8298200 Clean up raw type warnings in javafx.beans.property.* and com.sun.javafx.property.* [v2]

John Hendrikx jhendrikx at openjdk.org
Sat Dec 10 17:27:01 UTC 2022


On Sat, 10 Dec 2022 13:39:42 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

> On another note, I'm looking at ListExpression's add and other modifying methods. It's calling EMPTY_LIST.add(element) where ObservableList EMPTY_LIST = FXCollections.emptyObservableList();. Wouldn't that throw an exception since it's an empty unmodifiable observable list?

I saw that code and its intentional.  I think the java doc at the top gives the hint:

> If the wrapped list of a {@code ListExpression} is {@code null}, all methods implementing the {@code List} interface will behave as if they were applied to an immutable empty list.

-------------

PR: https://git.openjdk.org/jfx/pull/969


More information about the openjfx-dev mailing list