| Summary: | [1.7] Quick fix on unhandled exceptions raised during auto close of a resource | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | markus.kell.r |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Ayushman Jain
The snippet is not self-contained. When I change it to the following, it's about the same as bug 348708. import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; public class Snippet2 { private FileInputStream ff; void foo(String name, boolean b) throws FileNotFoundException { ff = new FileInputStream(name); try (FileInputStream fis = ff) { // see here if (b) throw new IllegalArgumentException(); else throw new IOException(); } catch (IllegalArgumentException e) { e.printStackTrace(); } System.out.println("SUCCESS"); } } *** This bug has been marked as a duplicate of bug 348708 *** |