This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Hints for "surround with try-catch" aren't displayed when located outside of a method | ||
---|---|---|---|
Product: | java | Reporter: | Max Sauer <msauer> |
Component: | Hints | Assignee: | Tomas Hurka <thurka> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | screenshot |
Description
Max Sauer
2005-08-11 09:24:04 UTC
Created attachment 23715 [details]
screenshot
Changing it to enhancement. Could be solved via initializer, like this: class smtg { String FileName = "new.txt"; File fr = new File(FileName); FileOutputStream fo; { try { fo = new FileOutputStream(fr); } catch (FileNotFoundException ex) { ex.printStackTrace(); } } } I can also use "Surround with Try-Catch" inside an initializer, but no hint is aviable there. |