Community
Participate
Working Groups
Build ID: 3.2 Steps To Reproduce: 1. build the latest Harmony jre 2. dowload EUT runniing script from jira-2038 3. update eut.properties: set test.jre.home= to Harmony jre home 4. run "ant -Dtests=jdtcorecompiler" More information: The method org.eclipse.jdt.internal.compiler.lookup.Scope.minimalErasedCandidates(TypeBinding[], Map) uses HashSet for parameter types storing, but, according to the spec, HashSet does not keep the insertion order. This is the cause of 58 failures of jdtcorecompiler tests on Harmony VM. See the following link for more details: http://issues.apache.org/jira/browse/HARMONY-3393 If I replace HashSet with LinkedHashSet all of the tests successfully pass.
It is using a HashMap.
Ignore previous comment. Specific invocations are indeed stored into a HashSet, which I presume is what you were referring too.
Problem is that LinkedHashSet was only introduced in 1.4, and this part of compiler cannot use 1.4 specific additions.
Yes, you are right. So, maybe it's reasonable to use LinkedList instead of HashSet?
Created attachment 67990 [details] Proposed patch Proposed alternate solution using a list instead.
Adjusted GenericTypeTest#test0985.
Created attachment 68019 [details] Patch including test change
Created attachment 68031 [details] Better patch Avoid allocating list of size 1
Olivier - pls review
Andrey - are you able to apply the patch, and assess that it effectively addresses the Harmony issue ?
Kent - pls review
Created attachment 68073 [details] Even better patch Removed unnecessary check for size==1, since lists are only created when size > 1.
Phillipe, the patch is seems to be ok, now the tests pass on Harmony. Thanks.
Created attachment 68103 [details] Even better patch 2 Using a TypeBinding[] instead of a List.
+1
No sign of Kent - Jerome pls review.
Released for 3.3RC2. Fixed
Verified for 3.3RC2 using I20070524-0010