Skip to content

Why both method invoked?V20 #2768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chxiaowu opened this issue Mar 23, 2017 · 3 comments
Closed

Why both method invoked?V20 #2768

chxiaowu opened this issue Mar 23, 2017 · 3 comments

Comments

@chxiaowu
Copy link

`public class Consumer {

@Subscribe
public void test1(List<Event1> list) {
	System.out.println("in event 1 list...");

}

@Subscribe
public void test2(List<Event2> list) {
	System.out.println("in event 2 list...");

}

}`

`public class MainTest {

public static void main(String[] args) {
	List<Event1> list = new ArrayList<>();
	list.add(new Event1());
	EventBus eventBus = new EventBus();

	Consumer consumer = new Consumer();
	eventBus.register(consumer);
	eventBus.post(list);
}

}`

@chxiaowu chxiaowu changed the title Why both method invoked? Why both method invoked?V20 Mar 23, 2017
@perceptron8
Copy link
Contributor

This is a duplicate of #1431.

@chxiaowu
Copy link
Author

Thanks...
shame on ......

@cpovirk cpovirk closed this as completed Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants