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 4817 - Problems compiling final inner classes (code compiles correctly with VC)
Summary: Problems compiling final inner classes (code compiles correctly with VC)
Status: CLOSED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-11-30 19:53 UTC by _ tboudreau
Modified: 2007-09-26 09:14 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 _ tboudreau 1999-11-30 19:53:48 UTC
Hi,

I ran across this problem while integrating some code that compiled correctly with Visual Cafe into NetBeans.

I had something like this:

public class Rule {

  public static final Expression exp;

  static {
    try {
      exp = new Expression("I could throw an exception");
    }

    catch (ExpressionFormatException e) {
      exp = null;
      e.printStackTrace();
    }
  }

}
Under VC this compiled fine, but in NetBeans I get a compiler error stating that exp should be initialized or set in every constructor.  I could not find a way of getting around this...  except for re
moving the "final" keyword ! Any suggestions or is this a bug ?
Comment 1 Marek Grummich 2000-07-25 09:22:59 UTC
Priority is changed to P4 (normal).
Comment 2 Quality Engineering 2003-07-02 15:33:56 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.
Comment 3 Quality Engineering 2003-07-02 15:42:31 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.