Skip to content

SimpleListProperty becomes unmodifiable when deserializing a null value.  #33

@WildeTechSolutions

Description

@WildeTechSolutions

When you have a SimpleListProperty such as

private final SimpleListProperty<Part> parts = new SimpleListProperty<>(this, "parts", FXCollections.observableArrayList());

there is a problem when deserializing a json object that has a null value:

{
    "parts": null,
...
}

You will later get a java.lang.UnsupportedOperationException exception when trying to add objects to the list. It would be nice if there was an option to simply create an empty list when accepting a null value, that way we wouldn't have to then do a null check on the list's getter.

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