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

Already on GitHub? Sign in to your account

Subscription Comparator is limiting the number of classes that are notified of events #3

Closed
agile001 opened this Issue Nov 21, 2012 · 1 comment

Comments

Projects
None yet
2 participants

Hi Benni,

I spent half of yesterday debugging an issue I was seeing when I would subscribe multiple classes to the same event but only see the first 2 registered listeners being notified so I thought I'd share my findings with you.

I've forked your repo and updated it with the debugging log entries I created and a bit of hack code to get around the cause of the problem I was seeing.

I've also added a new unit test class (org.mbassy.MBassadorExtendedTest) which exposes the issue for you to see.

In the Subscription class I've included a boolean switch in the SubscriptionByPriorityDesc comparator so you can turn the original code on and off to see it's affect on the unit test results.

Hope this is useful.

Regards,
David E.

Owner

bennidi commented Nov 21, 2012

Pretty cool Dave. Thanks a lot (how could I forget to sort the hash codes and write a proper unit test? damn!). I will update the code tomorrow.

@bennidi bennidi pushed a commit that referenced this issue Nov 22, 2012

benni bugfix issue #3, added more test cases 989ed67

@ghost ghost assigned bennidi Nov 22, 2012

@bennidi bennidi closed this Nov 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment