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.
The newly introduced org.netbeans.core.filesystems.FileEntityResolverTest seems to fail randomly.
Created attachment 26616 [details] Nov 04, 2005 failure
#68077: More logging and possibly a fix as there could be problem with cache in MIMESupport core/test/unit/src/org/netbeans/core/filesystems/FileEntityResolverTest.java,v <-- FileEntityResolverTest.java new revision: 1.4;
Created attachment 26695 [details] Failure in wrong loader
Created attachment 26696 [details] Failure in wrong result from lookup
.
Logging in XMLDataObject improved. Let's wait for next failures: Checking in core/test/unit/src/org/netbeans/core/filesystems/FileEntityResolverTest.java; /cvs/core/test/unit/src/org/netbeans/core/filesystems/FileEntityResolverTest.java,v <-- FileEntityResolverTest.java new revision: 1.5; previous revision: 1.4 done Checking in openide/loaders/src/org/openide/loaders/XMLDataObject.java; /cvs/openide/loaders/src/org/openide/loaders/XMLDataObject.java,v <-- XMLDataObject.java new revision: 1.20; previous revision: 1.19
Created attachment 26945 [details] Nov 14, 2005 failure
It seems to me that the problem is in MIMESupport. The previous log shows that the resolver is correctly registered to the lookup: [TEST-testNewResolverShallInfluenceExistingDataObjects] THREAD:main MSG:What is the result: [MIMEResolverImpl.Impl[MultiFileObject@da3a1e[Services/MIMEResolver/Lenkaresolver.xml], null]] but later when mimetype is queried, it is returned as content/unknown: [org.openide.loaders.DataObject.Validator] THREAD:Refresh Loader Pool MSG:Iterate: AbstractFileObject@17494c8[X.lenka] [org.openide.loaders.DataObject.Validator] THREAD:Refresh Loader Pool MSG:Original: org.openide.loaders.DefaultDataObject@1e808ca[AbstractFileObject@17494c8 [X.lenka]] [TEST-testNewResolverShallInfluenceExistingDataObjects] THREAD:Refresh Loader Pool MSG:findPrimaryFile: AbstractFileObject@17494c8[X.lenka] with mime: content/unknown What happens inside fileObject.getMIMEType() is unknown to me. Please add there a bit of logging and close the bug so we can find the reason of the failure next time it happens.
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v <-- new revision: 1.7; previous revision: 1.6 /cvs/openide/fs/test/unit/src/org/openide/filesystems/MIMESupportTest.java,v <-- new revision: 1.2; previous revision: 1.1 /cvs/core/test/unit/src/org/netbeans/core/filesystems/FileEntityResolverTest.java,v new revision: 1.6; previous revision: 1.5 There were two bugs in MIMESupport: - if content of MIMEResolvers in lookup has changed then cahed mimetypes resolved by last call weren't thrown away - if content of MIMEResolvers in lookup has changed then MIMESupport stoped listen on changes in lookup it all (introduced in one of the last revisions) Jarda, please review my commit cause this piece of code is really fragile. Hopefully this will help with failing tests. If not then will be reopened.