Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Serializable List not working with @FragmentArg #1313

@andersu

Description

@andersu

I have a list of serializable objects List legs;
It is annotated with @extra in my activity and with @FragmentArg in my fragment.

When I send this list from one activity to another via
RouteLegsActivity_.intent(this).legs(legs).start();
it works find and the generated code is

public RouteLegsActivity_.IntentBuilder_ legs(List<Leg> legs) {
            return super.extra(LEGS_EXTRA, ((Serializable) legs));
}

When I try to do the same to the fragment via RouteLegsFragment_.builder().legs(legs).build()
the generated code is:

public RouteLegsFragment_.FragmentBuilder_ legs(List<Leg> legs) {
            args.putSerializable(LEGS_ARG, legs);
            return this;
}

This does not compile because of the missing cast to Serializable.
This seems like a bug to me. Or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions