You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one changes the TreeSet to a HashMap, which then gets sorted to determine the highest priority.
But i wasn't very happy with the result. So I resolved the issue here in a different way. I haven't found a way to sort a set in a significant simpler way, than the TreeSet already used here. So instead I modified the Comparator function to make sure it will never deem two objects equal. And since there sometimes just is no way to establish a greater or less than relationship of two priorities or presences, it shouldn't matter at all in what order those same prioritized Presence objects are represented in the TreeSet.
I agree. I've improved the draft implementation to make it consistent with equals. I also agree with what you said before, about a Set being the wrong choice here but rather a SortedList. I've searched the whole project for TreeSets and skimmed over the code. Some of those could also suffer from the same issue. I think in the long term those TreeSets should be weeded out.
However in the short term I want to go with the smaller fix, since it should be less prone to bugs. I will test it a little bit more and then create the PR.
I'm opening this separate issue thread for the bug mentioned here and here
The bug lies here
The text was updated successfully, but these errors were encountered: