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 6365 - org.openide.src.ClassElement`s member manipulation methods do not preserve object identity.
Summary: org.openide.src.ClassElement`s member manipulation methods do not preserve ob...
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-04-18 23:55 UTC by Svata Dedic
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 Svata Dedic 2000-04-18 23:55:37 UTC
If you use ClassElement.setMethods() for example always replaces entries of method collection with cloned items from the manipulator argument, not paying attention to the fact that some of the metho
ds (the same instances) are already present. They are cloned anyway.

PropertyListeners that are observing class` method(s) are still attached to the old (and now disconnected)  instances. Bad thing is, that after the replacement, getDeclaringClass().getMethods() doesn`
t list the method instance it was called on.


[Svata-update] The above applies for JavaLoader-based implementation as well. clazz.setMethods(clazz.getMethods()) edits the source file although there`s no point in doing that.
Comment 1 Svata Dedic 2001-03-01 18:11:11 UTC
Reopening -- refactored module allows to solve it.
Comment 2 Svata Dedic 2001-03-01 18:11:56 UTC
Fixed in the new implementation of java module.
memory-represented classes still suffer from this bug, but given their usage, the impact is very minor.
Comment 3 Quality Engineering 2003-07-01 13:19:40 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.