Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358846

Summary: [1.7][preferences] new warning for missing try-with-resources
Product: [Eclipse Project] JDT Reporter: Ayushman Jain <amj87.iitr>
Component: UIAssignee: Deepak Azad <deepakazad>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: amj87.iitr, daniel_megert, deepakazad, kkazmierczyk+eclipse, Konstantin.Scheglov, markus.kell.r, Olivier_Thomann, satyam.kandula, srikanth_sankaran, stephan.herrmann
Version: 3.7   
Target Milestone: 3.8 M3   
Hardware: Other   
OS: Linux   
Whiteboard:
Bug Depends on: 349326    
Bug Blocks: 349390    

Description Ayushman Jain CLA 2011-09-26 01:49:39 EDT
+++ This bug was initially created as a clone of Bug #349326 +++

This bug is to track the new Errors/warning preferences UI. New options are:
- Potentially unclosed variable of type closeable.
- Unclosed variable of type closeable
- Resource of type Autocloseable not managed with try-with-resource (1.7+ only)
Comment 1 Ayushman Jain CLA 2011-09-26 02:10:43 EDT
(In reply to comment #0)
> - Resource of type Autocloseable not managed with try-with-resource (1.7+ only)

This, I believe, is an internal error that the UI can used for quick fixes. So no UI needed for this. Right, Stephan?
Comment 2 Stephan Herrmann CLA 2011-09-26 03:14:53 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > - Resource of type Autocloseable not managed with try-with-resource (1.7+ only)
> 
> This, I believe, is an internal error that the UI can used for quick fixes. So
> no UI needed for this. Right, Stephan?

It seems we've changed our minds (see bug 349326 comment 65).
So, UI for that option would be needed, too.
Comment 3 Deepak Azad CLA 2011-09-29 10:00:26 EDT
Fixed in HEAD. Commit - d77b8b62a5936fdb3c349c4e513bf9c3b2fefa81

The labels for new warnings are
Resource leak:
Potential resource leak:
Resource not managed via try-with-resource (1.7 or higher):

I also changed 'Redundant type arguments' to 'Redundant type arguments (1.7 or higher):'
Comment 4 Dani Megert CLA 2011-10-26 03:35:33 EDT
Verified in I20111025-1800.
Comment 5 Dani Megert CLA 2011-10-26 04:19:26 EDT
Verified through code inspection.