Summary: | Test MethodVerifyTest#testBug317719h fails when run with 1.6 JVM | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Satyam Kandula <satyam.kandula> | ||||
Component: | Core | Assignee: | Satyam Kandula <satyam.kandula> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, srikanth_sankaran | ||||
Version: | 3.8 | ||||||
Target Milestone: | 3.8 M3 | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Satyam Kandula
2011-09-28 01:34:20 EDT
This problem happens with only some versions of Java. I didn't run with many versions of Java to find out the difference, but I think it is to do with IBM Java and Sun Java. I believe IBM JVM had LinkedHashMap overridden put(), but Sun Java doesn't causing the difference. Created attachment 204163 [details]
Proposed test patch
Changing the reference of LinkedHashMap to HashMap seems to keep both the java versions happy. Ayush, Here is the patch modifying it. Please look at it and see if this will break the intended test.
(In reply to comment #1) > This problem happens with only some versions of Java. I didn't run with many > versions of Java to find out the difference, but I think it is to do with IBM > Java and Sun Java. > > I believe IBM JVM had LinkedHashMap overridden put(), but Sun Java doesn't > causing the difference. Ah! I did conclude some VM difference is causing this but this is interesting to know! :)(In reply to comment #2) > Changing the reference of LinkedHashMap to HashMap seems to keep both the java > versions happy. Ayush, Here is the patch modifying it. Please look at it and > see if this will break the intended test. The patch looks good and preserves the behaviour being tested. Released the patch in master. http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=166c95a7f5d14add7c42133646d3ce6662785db7 Verified for 3.8 M3 using build id: N20111022-2000 |