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 108886 - Resolve "references to invalid objects" issue
Summary: Resolve "references to invalid objects" issue
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-04 16:07 UTC by Vladimir Kvashin
Modified: 2007-08-22 18:40 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2007-07-04 16:07:41 UTC
When code model objects become invalid (for example, after reparse), some model clients can store the references to such
invalid objects and manipulate with them.

After we introduced repository, this often leads to calls to repository with inexistent keys, assertions, NPEs, etc. 

We have boolean isValid() method in most of objects, but it does not always help since objects are usually processed in
a separate thread and nothing guarantees that valid/invalid state will change between "if" and the next code line.

This should be solved somehow.
Comment 1 Vladimir Kvashin 2007-07-04 16:23:12 UTC
In 5.5.1 there were a lot of fixes on code model clients side in this respect. 
So now the consequences of this issue are very rare.

But the possibility of such issues still exists.
Besides, this makes clients code too complicated. There is no simple way to write a reliable model client - even the
most simple one.
Comment 2 Vladimir Kvashin 2007-07-11 22:12:33 UTC
For now we still have no particular complaints from QA, users or developers.

The issue is still to be solved, because leaving it as is 
- makes writing client code very difficult
- can cause errors (exceptions)

But I'm sure this task should be waived (5.5.x -> 6.0)



Comment 3 Vladimir Kvashin 2007-08-22 18:40:23 UTC
We still have no particular complaints related with this.
I think we still need this, but mostly in order to make writing code model clients easier - which is very important for
community... but isn't a P2 defect of this release.