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 15643 - MIME Resolvers are duplicated
Summary: MIME Resolvers are duplicated
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2001-09-19 15:17 UTC by Petr Nejedly
Modified: 2008-12-22 23:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2001-09-19 15:17:52 UTC
If I ask Lookup for all instances of MIMEResolver.class,
I'll get all entries duplicated.
i.e.:
Collection all = result.allInstances();
HashSet uniq = new HashSet(all)
all.size() == 2* uniq.size()

Not sure if it isn't problem of the lookup, reassing on your decision
Comment 1 _ pkuzel 2001-09-19 15:41:32 UTC
It seems like a problem in lookup as there are returned same intances:

MIMEResolverImpl.Impl[Services/MIMEResolver/org-apache-tools-ant-module-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@4d518c]:2973611
MIMEResolverImpl.Impl[Services/MIMEResolver/org-netbeans-modules-jarpackager-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@1fb328]:5468147
MIMEResolverImpl.Impl[Services/MIMEResolver/org-netbeans-modules-scripting-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@2b37e2]:6417127
MIMEResolverImpl.Impl[Services/MIMEResolver/org-apache-tools-ant-module-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@4d518c]:2973611
MIMEResolverImpl.Impl[Services/MIMEResolver/org-netbeans-modules-jarpackager-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@1fb328]:5468147
MIMEResolverImpl.Impl[Services/MIMEResolver/org-netbeans-modules-scripting-mime-resolver.xml,
[Lorg.netbeans.core.filesystems.MIMEResolverImpl$FileElement;@2b37e2]:6417127
Comment 2 Petr Nejedly 2001-09-20 11:20:14 UTC
BTW: It seems that fixing this could speed up recognition of
DataObject by about 10%
Comment 3 Jaroslav Tulach 2001-09-24 18:13:17 UTC
I have listed all items and it seems that they are really registered
twice. Find out why:

item:
SL[/IDEConfiguration/System/MIMEResolver/org-apache-tools-ant-module-mime-resolver
item:
SL[/IDEConfiguration/System/MIMEResolver/org-netbeans-modules-jarpackager-mime-resolver
item:
SL[/IDEConfiguration/System/MIMEResolver/org-netbeans-modules-scripting-mime-resolver
item: SL[/MIMEResolver/org-apache-tools-ant-module-mime-resolver
item: SL[/MIMEResolver/org-netbeans-modules-jarpackager-mime-resolver
item: SL[/MIMEResolver/org-netbeans-modules-scripting-mime-resolver


Comment 4 Jaroslav Tulach 2001-09-25 14:11:52 UTC
More likely bug in the way how settings and their UI is organized on
the XML layer.
Comment 5 Jan Pokorsky 2001-09-25 19:30:27 UTC
Strange. MIME Resolvers are defined absolutely same way as e.g. 
compiler types in the xml layer. But comp. types are listed just once 
in the lookup result!

Me and Vita are going to separate ui from Services folder but IMO the 
Lookup behavior should be consistent for shadows.
Comment 6 Jaroslav Tulach 2001-10-01 16:16:22 UTC
/Services/IDEConfiguration/System/MIMEResolver/ is a DataShadow to
/Services/MIMEResolver

The fix should be based on storing the links somewhere else - /UI/
folder, etc...
Comment 7 Jan Pokorsky 2001-10-02 12:17:24 UTC
Increased priority to P1. Category locations must be changed before 
beta releasing.
Comment 8 Pavel Buzek 2001-10-05 16:28:28 UTC
for more info about proposed solution and impact on modules, see:

http://www.netbeans.org/servlets/ReadMsg?msgId=164880&listName=nbdev
Comment 9 Vitezslav Stejskal 2001-10-09 02:42:28 UTC
Separating settings UI presentation from the lookup storage fixed this problem. Lookup query for 
MIMEResolver.class returns unique instances of resolvers. Please verify.

[9 Oct 2001] Fixed in main trunk.
Comment 10 Petr Nejedly 2001-10-09 09:13:17 UTC
Verifying against latest CVS trunk sources as of 200110091000
Comment 11 Quality Engineering 2003-07-01 16:23:06 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.