Sitelet https://github.com/androidannotations/androidannotations/issues/591
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.

A bug If I have the same method name  #591

Description

@Tanlet

Sorry for my awful English.
Thanks to your work!AndroidAnnotation is a great project.I like this so muck.But I think I find a bug in my project.

Class 1:

@EActivity
public class Test1 extends Activity {
    @AfterViews
    public void init() {
        Log.v("","Word");
    }
}

Class 2:

@EActivity
public class Test2 extends Test1 {
    @AfterViews
    public void init() {
        Log.v("","Hello");
    }
}

The result is twice "Hello".
The reason is easy to find.
In the Test2_,We find this:

private void afterSetContentView_() {
      text = ((TextView) findViewById(id.text));
      init();
      init();
}

The right result is :

private void afterSetContentView_() {
     text = ((TextView) findViewById(id.text));
     init();
     supper.init();
}

Of course ,If you rename init() in Test2 to init2().It will work well.

No activity

Activity on this issue will appear here.

Activity

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