Summary: | FUP of bug 345334: CodeSnippetTest has lot of failures | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||
Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | critical | ||||||
Priority: | P3 | CC: | jarthana, Olivier_Thomann, srikanth_sankaran | ||||
Version: | 3.7 | Flags: | jarthana:
review+
|
||||
Target Milestone: | 3.7 RC1 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Ayushman Jain
2011-05-12 06:34:38 EDT
(In reply to comment #0) > There might be some deficiency in the fix. I'm investigating I understood the problem. The tests fail in 1.5 mode because we're adding the @Override annotation in 1.6 and above only, whereas in the CodeSnippetTest.getCompilerOptions() method, we have configured the detection of @Override annotations with CompilerOptions.OPTION_ReportMissingOverrideAnnotation (which works for 1.5 as well) to ERROR. This becomes relevant in 1.5 scenario because the dummy class we build for the code snippet has the form public class CodeSnippet_3 extends GlobalVariables_3 So, basically not just the tests fail for 1.5 mode, but even the original bug has not been fixed in 1.5 (In reply to comment #1) Another problem: Configuring the 2 override detection options to ERROR is not a good idea since some code snippets may have methods that they are overriding from java.lang.Object. Eg: testFreeReturnAnonymous(). Its better to just have a separate regression test for this which tests the fix. Patch upcoming Created attachment 195489 [details]
proposed fix + tests
The fix has 2 parts:
1) Add @override for 1.5 also, so that whatever the user configuration is, the code snippet runs.
2) Add separate test for the fix
+1 for the patch. The patch also fixes the bug #345569 in 1.5 compliance mode. Patch looks good. Ayush, Jay see if we have a chance to release this for RC1, after all tests are found to be green. Ayush, your initiative in resolving this is much appreciated. +1. Thanks, Ayushman. I made the mistake of using -Dcompliance=1.6 when running all the tests. Please release. We will recontribute. Released in HEAD for 3.7RC1 Verified for 3.7RC1 with build I20110514-0800. Also verified that the reported tests are passing now. |