Bug 146215 - JDT Core tests should not be dependent on HashMap implementation
Summary: JDT Core tests should not be dependent on HashMap implementation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-09 06:16 EDT by Jerome Lanneluc CLA
Modified: 2006-09-17 12:06 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix (29.48 KB, patch)
2006-06-09 06:55 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2006-06-09 06:16:43 EDT
3.2RC7

With the latest Sun 1.5.0_08 VM, the implementation of HashMap seems to have changed, and iterating over the keys results in a different order.

The JDT Core tests are now failing as they rely on the original order to compare the actual result against the expected result.
Comment 1 Jerome Lanneluc CLA 2006-06-09 06:55:12 EDT
Created attachment 43972 [details]
Proposed fix
Comment 2 Jerome Lanneluc CLA 2006-06-09 07:29:20 EDT
Note that this fix changes the order of attributes in a classpath entry even if the VM doesn't change. 

There will be outgoing changes to the .classpath in the following scenario:
1. User runs Eclipse on Sun 1.4.2 VM.
2. This patch is applied
3. User adds a library entry to the build path
User will see the the new entry as an outgoing change, BUT it will also see existing entries being changed since their attributes order has changed.

There won't be any outgoing changes to the .classpath in the following scenario:
1. User runs Eclipse on Sun 1.4.2 VM.
2. This patch is applied
3. User edit the buildpath, adds a library in the buildpath wizard, changes her mind and remove the library, then press OK.
Comment 3 Jerome Lanneluc CLA 2006-06-09 07:29:59 EDT
Released in HEAD.
Released in TARGET_321.
Comment 4 Frederic Fusier CLA 2006-06-12 06:24:15 EDT
Released for 3.2.1
Released for 3.3 M1
Comment 5 Frederic Fusier CLA 2006-08-07 07:18:58 EDT
Verified for 3.3 M1 using build I20060807-0010.