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 9287

Summary: SharedClassObject.putProperty fails to call initialize()
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: anovak <anovak>
Status: CLOSED FIXED    
Severity: major    
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 9044    

Description Jesse Glick 2001-01-29 19:30:01 UTC
SCO.putProperty should call initialize() before doing anything else, just as
getProperty does. Otherwise some things can fail to work correctly; e.g.
SystemOption's as created by the apisupport template will quietly fail to save
settings across IDE restarts, since upon restore putProperty is called with the
saved values, then getProperty is called at some point, which calls
initialize(), which calls putProperty() with the default values!
Comment 1 Jesse Glick 2001-01-30 15:55:59 UTC
Seems other things depend on this.
Comment 2 Jesse Glick 2001-01-30 18:08:59 UTC
Looking at the code, the bug was introduced by anovak's 1.20. The log comment
says that the change was made to speed up initialization of SCO's, but the
semantics is clearly wrong now and it seems several things are broken by it. I
don't understand the reasoning behind the original change, so Ales can you
please look at it? Either rollback 1.20 or try to fix the performance so that
the semantics are correct? Also how significant was the performance gain?

The basic problem is that it is common for initialize() implementations to call
putProperty(), and if someone calls putProperty() early on, then initialize()
can be called later, overwriting the earlier actions. initialize() docs say it
will be called the first time a SCO is used, which clearly includes calls to
putProperty.
Comment 3 Quality Engineering 2003-07-01 15:58:17 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 4 Quality Engineering 2003-07-01 16:16:53 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.