Bug 213570 - IncrementalTests#testRenameMainType() fails with IBM JRE 6.0
Summary: IncrementalTests#testRenameMainType() fails with IBM JRE 6.0
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-20 06:50 EST by Eric Jodet CLA
Modified: 2008-08-29 14:44 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (12.89 KB, patch)
2007-12-20 10:58 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jodet CLA 2007-12-20 06:50:50 EST
Version: 3.4.0
Build id: I20071218-0800

java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260-20071123_01)
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260-20071121
_15015 (JIT enabled)
J9VM - 20071121_015015_lHdSMR
JIT  - r9_20071121_1330
GC   - 20071031_AA)
JCL  - 20071118_01

Comparison failure:
junit.framework.ComparisonFailure: Invalid problem(s)!!!.
----------- Expected ------------
Problem : The public type _A must be defined in its own file [ resource : </Project/src/p/A.java> range : <25,27> category : <40> severity : <2>]
Problem : A cannot be resolved to a type [ resource : </Project/src/p/B.java> range : <35,36> category : <40> severity : <2>]
Problem : The hierarchy of the type C is inconsistent [ resource : </Project/src/p/C.java> range : <25,26> category : <40> severity : <2>]
------------ but was ------------
Problem : The hierarchy of the type C is inconsistent [ resource : </Project/src/p/C.java> range : <25,26> category : <40> severity : <2>]
Problem : A cannot be resolved to a type [ resource : </Project/src/p/B.java> range : <35,36> category : <40> severity : <2>]
Problem : The public type _A must be defined in its own file [ resource : </Project/src/p/A.java> range : <25,27> category : <40> severity : <2>]
Comment 1 Frederic Fusier CLA 2007-12-20 07:09:45 EST
I'll investigate
Comment 2 Frederic Fusier CLA 2007-12-20 10:58:59 EST
Created attachment 85657 [details]
Proposed patch

The compareTo(Object) method of org.eclipse.jdt.core.tests.builder.Problem initial implementation may change problems order while sorting when different VM are used.

Change the algorithm to compare the toString() strings instead fixes the problem.
Comment 3 Frederic Fusier CLA 2007-12-20 11:06:48 EST
Released for 3.4M5 in HEAD stream.
Comment 4 Olivier Thomann CLA 2008-08-29 14:44:17 EDT
No need to wait for 3.5M2 to verify this one as it is supposed to be done for 3.4.0.