Bug 79414 - states with same time stamps may appear in the wrong order
Summary: states with same time stamps may appear in the wrong order
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-24 12:30 EST by Rafael Chaves CLA
Modified: 2004-11-25 18:08 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2004-11-24 12:30:32 EST
i20041123

Using the local history UI, sometimes states that have the same apparent
timestamp may be in the wrong order. I could verify this with both new and
existing implementation for the history store. Need to investigate if it is us
or Compare.
Comment 1 Rafael Chaves CLA 2004-11-24 15:37:06 EST
Verified we are behaving correctly. We return the states in the right order as
spec'd.

The problem comes from the fact that compare will try to sort the states
(history items, actually) again (EditionSelectionDialog.internalSort), and the
sorting algorithm used (quick sort) is not stable, potentially changing the
order of states with the same modification time.
Comment 2 Rafael Chaves CLA 2004-11-25 16:30:25 EST
Suggestion: you can use java.util.Arrays.sort(Object[], java.util.Comparator),
which is guaranteed to be stable.
Comment 3 Andre Weinand CLA 2004-11-25 18:08:05 EST
fix released for N20041126