Fix a bug in PriorityQueue where compareTo() is used instead of equals() in the remove() method.

According to the documentation for PriorityQueue, equals() must be used.

Fixed one unit test (which needed the incorrect behaviour in order to pass). Verified that the old test fails against Sun's libraries, and the new one passes (and fails against ours until the change is applied).

Change-Id: I93e7d3435d5cdc4432969585064df704f92d6ae5
2 files changed