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 22524 - Static Initializer Block & Import Management Tool
Summary: Static Initializer Block & Import Management Tool
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-17 08:32 UTC by Tomas Hurka
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase (829 bytes, text/plain)
2002-04-17 08:34 UTC, Tomas Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2002-04-17 08:32:52 UTC
[Reported by Bill Sutherland
<wsutherland@freeuk.com>]

Hello Tomas.

I've attached an example class that I think shows
up the problem. If you first use the IMT to look
at the way symbols have been resolved with the for
block commented out and then un-comment the for
block and look again, you'll see (I hope) that you
don't get the same picture. If you "Finish" the
IMP with the for block un-commented then you get
problems 
compiling, or at least I did.

You can compile the code by commenting out the for
block, using the IMT to resolve everything, and
then un-comment it again, so there is a
work-around, even if it's not a great one.

Regards, Bill.

p.s.

The problem is reproducable on both HP-UX and Mac
OS X platforms. I will attempt to raise an issue
tomorrow but I don't have an ID yet.
Comment 1 Tomas Hurka 2002-04-17 08:34:03 UTC
Created attachment 5436 [details]
Testcase
Comment 2 Tomas Hurka 2002-04-17 08:37:56 UTC
Ok, I found it. The bug is triggered only if there is another block
(i.e. something in { .. }) inside initializer. So for example
static {
	b = new File();
}

is OK.
Comment 3 Tomas Hurka 2002-04-17 09:38:39 UTC
Fixed in trunk.
Comment 4 Jan Becicka 2002-10-15 13:16:37 UTC
Verified in 200210090100
Comment 5 Quality Engineering 2003-07-01 13:20:44 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.