Skip to content

Bug: Base class fall backs to reflection, if derived class is consuming @Subscribe methods even with subscriber-index #351

@goeltarun

Description

@goeltarun

In my application I have a derived abstract class AbstractBaseActivity extending Activity which has the some new api for 23 like public final void onProvideAssistContent(AssistContent var1). There is a MainActivity that is deriving AbstractBaseActivity that is registering to event bus and has @Subscribe methods.

So when we register the eventbus for MainActivty we try to get the SubscriberMethod in SubscriberMethodFinder.java in method findUsingInfo and it gets correctly the subscriberMethods for MainActivty, but then it calls findState.moveToSuperclass(); were it tries to get the subscriber methods for the base class AbstractBaseActivity which since doesn't have any @Subscribe methods fall back to reflection and fails for the new api.

One question which I have is do we need to call the moveToSuperclass if i have already got the subscribe methods for the given class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions