| Summary: | Reference to java.util.Timer(String, boolean) not reported as error under 1.4 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Andrew Niefer <aniefer> | ||||||
| Component: | API Tools | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | darin.eclipse, Michael_Rennie | ||||||
| Version: | 3.6 | Flags: | Michael_Rennie:
review+
darin.eclipse: review+ |
||||||
| Target Milestone: | 3.6.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Andrew Niefer
Candidate for 3.6.1. This can have serious runtime issues. We actually detect the wrong reference but we don't report it properly since it belongs to the static initializer method (clinit). If the variable is not static, the problem is reported. But it is reported against the class name which is not ideal either. In this case we should have the right line to report the problem. (In reply to comment #2) > We actually detect the wrong reference but we don't report it properly since it > belongs to the static initializer method (clinit). > If the variable is not static, the problem is reported. I was wrong. We actually never collected references inside clinit methods. This is why we missed this error. Darin, this is a candidate for 3.6.1? (In reply to comment #5) > Darin, this is a candidate for 3.6.1? Guess I'd need to see a patch... to see how risky it is. I can't recall why clinit's were being ignored. Created attachment 174329 [details]
Proposed fix
Tests are running. So far, so good.
Created attachment 174332 [details]
Proposed fix + regression test
Same patch with a regression test that checks references inside static initializer are scanned.
Released for 3.7M1. Will release for 3.6.1 once this is reviewed and approved. +1. Patch is good and all tests pass. It still bugs me that I can't recall why we ignored clinits in the first place... Mac OS tests also all passed ok, thanks. I'll release shortly. Looks good. Released for 3.6.1. |