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 21952 - Do not load classes on startup
Summary: Do not load classes on startup
Alias: None
Product: utilities
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@utilities
Depends on:
Blocks: 21676
  Show dependency tree
Reported: 2002-03-28 16:42 UTC by Jaroslav Tulach
Modified: 2003-07-01 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

CVS commit report. (3.81 KB, text/plain)
2002-04-04 07:08 UTC, _ lkramolis
Used .instance files with "instanceOf" attribute name assigned. (3.00 KB, text/plain)
2002-04-04 14:16 UTC, _ lkramolis

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-03-28 16:42:33 UTC
I am working on issue 21676 and I have run the IDE with this patch and the
arguments described there. I have found out that following class is being
loaded into the system on startup. Please investigate why  and
prevent that to happen. Thanks.

Comment 1 _ lkramolis 2002-04-03 09:03:31 UTC
Fixed in main trunk.
Comment 2 Jaroslav Tulach 2002-04-04 06:35:44 UTC
Ok, Libor can you tell me what was wrong, I am searching for all ways
that may initialize a module class...
Comment 3 _ lkramolis 2002-04-04 07:08:11 UTC
Created attachment 5284 [details]
CVS commit report.
Comment 4 _ lkramolis 2002-04-04 07:09:44 UTC
See attached CVS commit report. Essentially I changed .instance with
Comment 5 Jaroslav Tulach 2002-04-04 08:56:56 UTC
I do not think that replacing .instance with .settings is the best
solution. Processing of .settings takes more time then .instance.

Please continue to use .instance, you can probably use:

<file name="BookmarkNode.instance">
  <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
  <attr name="instanceCreate"
newvalue="org.netbeans.modules.url.BookmarkNode" />

which should work the same and not load the class at startup.
Comment 6 _ lkramolis 2002-04-04 09:29:43 UTC
OK, I will revert it to .instance file.

But when you filed this bug I think you should write "'Do not load
classes on startup' bug-fixing guidelines" because I fixed this bug by
.settings files. And if you do not recommend it, you should publish
tips, how to correctly fix it. Thanks.
Comment 7 _ lkramolis 2002-04-04 14:16:37 UTC
Created attachment 5291 [details]
Used .instance files with "instanceOf" attribute name assigned.
Comment 8 _ lkramolis 2002-04-04 14:20:41 UTC
Jardo, I used your proposed solution again by .instance file. I have
extended it with instanceOf attribute name which is necessary:

<attr name="instanceOf" stringvalue="org.openide.nodes.Node,
org.openide.nodes.AbstractNode, org.openide.loaders.DataNode,
org.netbeans.modules.url.BookmarksNode" />

Is it right now?
Comment 9 Jaroslav Tulach 2002-04-13 14:11:27 UTC
Seems like BookmarkNode is gone. 

Other possible trick is to write 

<attr name="instanceClass" stringvalue="org.openide.nodes.Node" />

then you might skip the instanceOf attribute.
Comment 10 Quality Engineering 2003-07-01 15:31:38 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.