Community
Participate
Working Groups
For bug 363293, resource close methods have been added to some tests. However, the change in AbstractCompilerToolTest.java is not correct. With the change the file manager object gets closed even if it is passed as an argument. Though the current testcases doesn't get impacted, I think we shouldn't do this change.
Created attachment 207972 [details] Proposed patch
I'll use bug 362332 to change the reported warning into saying "potential leak". After that I'll apply the test change.
I just checked whether 362332 indeed solved this issue, but unfortunately we'll have to wait for the fix from bug 368546, too. Relaxing target milestone from 3.8 M5 to 3.8.
If you plan to include a fix for this in 3.8 M7, please adjust the target suitably, so it becomes easier to track.
I assume this should be easy now, as both pre-reqs are resolved now.
Created attachment 214450 [details] slightly more explicit fix OK, an unconditional close is no longer needed to silence the warning. Satyam, do you want to review the patch (which basically does the same as what you already proposed) or is it OK to push without review since it's a tests-only patch?
(In reply to comment #6) Please go ahead and push it.
Released for 3.8 M7 via commit ebee4ac330d3dc7dc9f8f11cab338cf905bf6dd5
Verified for 3.8M7 by looking at the code.