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

Summary: [60cat] No surround with try-catch hint in static initializer
Product: java Reporter: tboerkel <tboerkel>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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