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.

Bug 119175 - [60cat] No surround with try-catch hint in static initializer
Summary: [60cat] No surround with try-catch hint in static initializer
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-17 07:38 UTC by tboerkel
Modified: 2009-11-02 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tboerkel 2007-10-17 07:38:22 UTC
[ BUILD # : 200710071200 ]
[ JDK VERSION : 1.6.0_03 ]

Example:
  static {
    FileInputStream fis = new FileInputStream(new File("."));
  }
  
  public static void test() {
    FileInputStream fis = new FileInputStream(new File("."));
  }

In case of the method test(), the hint offers throws clause and
surround with try-catch.

In case of the static initializer, no hint is offered, but surround
with try-catch must be offered.
Comment 1 Jan Becicka 2007-10-17 13:44:06 UTC
Reproducible.
Comment 2 David Strupl 2009-03-31 15:58:16 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 3 Quality Engineering 2009-11-02 10:59:32 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX