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.
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.
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.
Created attachment 7364 [details] stack trace
sorry the attachmet is for other bug (it 7364)
verified in Nb 200209250100
Resolved for 3.4.x or earlier, no new info since then -> closing.