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 15096 - Lookup does not update after module enable
Summary: Lookup does not update after module enable
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 3.x
Hardware: Other Linux
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-03 16:14 UTC by Svata Dedic
Modified: 2008-12-22 17:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (7.44 KB, text/plain)
2002-09-10 17:10 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2001-09-03 16:14:46 UTC
Queries for module-provided data types give incorrect result after module 
reinstall. Works OK after the whole IDE is restarted.
To reproduce:
0. make sure there are other compilers than java module ones. Typically there 
will be ANT compilers.
1. create a Java source
2. set its compiler to something other than default, e.g. Internal Compilation
3. uninstall (disable) Java module
4. enable Java module
5. open file's properties
* Although the file's attributes hold serialized handle to the compiler type, 
the property sheet now still shows ANT compilation (or other compilation which 
was available all the time).
6. change the compiler to Internal compilation again
7. close properties window and open it again
* the compiler property AGAIN shows different compiler than the configured one.

Possible cause: Lookup seems to incorrectly cache result of query for a long 
time and does not reset the cache in response to recognized instance 
dataobject.

Justification for P-1:
The bug affects data available from default Lookup and 
ServiceType/ServiceType.Handle operations. It renders reloadable modules 
useless and gives very strange behaviour when reinstalling a module during the 
same IDE session.
Comment 1 Peter Zavadsky 2001-09-10 19:55:17 UTC
Fixed in [main-trunk]. Next build available.

Note: InheritanceTree kept queries also from uninstalled modules after
reinstalling the module, the old query catched the item -> old
classLoader versus settings instanceof.

Yarda, please, revise the patch.

Fix: there are removing old queries from the tree. If some query
(node) loses its last item and doesn't have a children its removed.

Possbile problems:
1) regression?! -> hopefully not, but it would be probably needed to
refine retainAllClasses and removeClass (for Interfaces as well?), the
way it has one entry point for removing nodes.
2) how to solve the case if two diff modules would need item from
shared lib (i.e. two items with same class name should exist) -> same
class name, but diff ClassLoaders? instanceOf doesn't work in this case.
Comment 2 pzajac 2002-09-10 17:10:57 UTC
Created attachment 7364 [details]
stack trace
Comment 3 pzajac 2002-09-10 17:12:43 UTC
sorry the attachmet is for other bug (it 7364)
Comment 4 pzajac 2002-09-25 14:24:26 UTC
verified in Nb 200209250100
Comment 5 Quality Engineering 2003-07-01 16:16:23 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.