Bug 358846 - [1.7][preferences] new warning for missing try-with-resources
Summary: [1.7][preferences] new warning for missing try-with-resources
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: Other Linux
: P3 enhancement (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 349326
Blocks: 349390
  Show dependency tree
 
Reported: 2011-09-26 01:49 EDT by Ayushman Jain CLA
Modified: 2011-10-26 04:19 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.