Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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.

@InstanceState Bundle bundle makes StackOverflowError #1324

Copy link
Copy link
@YoungjaeKim

Description

@YoungjaeKim
Issue body actions

When we code as below, it generates as follows,

    @InstanceState
    Bundle mBundle;

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putBundle("mBundle", mBundle);
    }

But, accidently when we code as below,

    @InstanceState
    Bundle bundle;

AA generates as below, as you expected.

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putBundle("bundle", bundle);
    }

This makes StackOverflowError due to infinite loop to do writeToParcel job, similar to the issue shown in the link: http://stackoverflow.com/a/15787218/361100

It would be good to throw an error when @InstanceState has variable named bundle.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.