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.

Parcelable generic argument doesn't work in @FragmentArg  #1484

Closed

Description

@pashky

Hi, I'm experiencing some trouble with generated code, if @efragment is generic.

For example, if I have following declaration:

@EFragment
public class ChoiceDialog<PayloadType extends Parcelable> extends Fragment {
    @FragmentArg 
    PayloadType payload;
     ...
}

Generated build then still tries to put Serializable into bundle:

        public ChoiceDialog_.FragmentBuilder_ payload(PayloadType callbackData) {
            args.putSerializable(PAYLOAD_ARG, callbackData);
            return this;
        }

I hope it's possible to find out upper bound from generics declaration and fix it, so it will put correct type. I'm fairly okay to revert to PayloadType extends Serializable in my case, which would work as putSerializable seems to be default, but still it would be nice to see it fixed in future.

Activity

  1. WonderCsabo commented on Jul 1, 2015

    @WonderCsabo
    Member

    This should be already fixed by #1445. Please check out the latest 4.0-SNAPSHOT version.

  2. pashky commented on Jul 1, 2015

    @pashky
    Author

    Wow, that was quick. I'll check it out, thanks!

  3. WonderCsabo commented on Jul 6, 2015

    @WonderCsabo
    Member

    @pashky i am assuming the latest 4.0-SNAPSHOT version is working for you. I am closing this issue. Please reopen if you still experience problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions