Skip to content

Suggestion:delete the judgtment of subscriberMethods.isEmpty()  #619

@konstant2016

Description

@konstant2016

Phenomenon: usually we register EventBus in the base class and annotate the subscribe method in the subclass, but if there is no public method in the subclass,the Eventbus will report : Fragment and its super classes have no public methods with the @subscribe annotation

Suggestion: delete this code:
if (subscriberMethods.isEmpty()) {
throw new EventBusException("Subscriber " + subscriberClass
+ " and its super classes have no public methods with the @subscribe annotation");
}

so:When subscriberMethods is empty, it returns subscriberMethods directly and no more errors are reported

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions