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 200848

Summary: XML layers from classpath discarded after LookupEvent on FileSystem
Product: platform Reporter: Jesse Glick <jglick>
Component: FilesystemsAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: jhorvath, jtulach
Priority: P2 Keywords: TEST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 129583, 201544    

Description Jesse Glick 2011-08-10 19:34:20 UTC
ModuleLayeredFileSystem.resultChanged calls appendLayer with addClasspathLayers=false, blowing away the XML layers and leaving behind just user directory modifications.

Seems to be cause of assorted random test failures visible in ProjectGenerator. (Why the lookup event is being fired at random is another question.)
Comment 1 Jesse Glick 2011-08-10 20:01:29 UTC
core-main #30630a09b8bd
Comment 2 Quality Engineering 2011-08-11 21:02:34 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/30630a09b8bd
User: Jesse Glick <jglick@netbeans.org>
Log: #200848: XML layers from classpath discarded after LookupEvent on FileSystem
Comment 3 Jaroslav Tulach 2011-09-20 12:42:27 UTC
The fix causes at least one, but possibly many regressions: bug 201544. Maybe also bug 202316.
Comment 4 Jaroslav Tulach 2011-09-22 18:39:07 UTC
I plan to backout this commint as it causes significant regression - e.g. bug 201544.
Comment 5 Jesse Glick 2011-09-22 19:43:15 UTC
OK, back out the current fix and downgrade to P3 if you think you understand what is wrong with it. Should be able to use the existing unit test to guide a revised fix. (BTW testNbRepositoryInitializedFromClasspath seems to be order-sensitive so it should probably be split into its own suite.)
Comment 6 Jaroslav Tulach 2011-09-23 20:14:22 UTC
ergonomics#7723233dd167
Comment 7 Jesse Glick 2011-09-23 20:27:17 UTC
Should this maybe use ModuleLayeredFileSystem.class.getClassLoader() instead? ClassLoader.systemClassLoader might be wrong when run from NbModuleSuite etc.
Comment 8 Quality Engineering 2011-09-30 14:40:36 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7723233dd167
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #200848: Read classpath layers only from classpath classloader