Skip to content

Support for empty lists #155

Description

@yschimke
@Xml(name = "list")
data class TaskList(
    @Attribute
    var id: String,

    @Element
    var taskseries: List<TaskSeries>
)

Fails on

    <list id="45104215"/>

With

java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter taskseries

Is the only solution to make the list nullable? I consider this an empty list rather than a null list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions