infobox manager: keep infoboxes in order of insertion
Collections.binarySearch() does not guarantee which element is found if there are multiple that compare equal, leaving the order of infoboxes not necessarily in insertion order. This was an unintended side effect ofba9ffb1d60and406c2bc7db.
This commit is contained in:
@@ -114,5 +114,8 @@ public class InfoBoxManagerTest
|
||||
infoBoxManager.addInfoBox(new TestInfobox(InfoBoxPriority.MED, "three"));
|
||||
|
||||
assertEquals(3, infoBoxManager.getInfoBoxes().size());
|
||||
assertEquals("one", infoBoxManager.getInfoBoxes().get(0).getText());
|
||||
assertEquals("two", infoBoxManager.getInfoBoxes().get(1).getText());
|
||||
assertEquals("three", infoBoxManager.getInfoBoxes().get(2).getText());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user