Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 9287 - SharedClassObject.putProperty fails to call initialize()
SharedClassObject.putProperty fails to call initialize()
Product: platform
Classification: Unclassified
Component: -- Other --
PC Linux
: P2 (vote)
Assigned To: anovak
Depends on:
Blocks: 9044
  Show dependency treegraph
Reported: 2001-01-29 19:30 UTC by Jesse Glick
Modified: 2008-12-22 17:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
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
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.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo