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 63126 - $userdir/config/.nbattrs polluted
Summary: $userdir/config/.nbattrs polluted
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: TAX (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 08:14 UTC by Jesse Glick
Modified: 2009-02-19 23:31 UTC (History)
0 users

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 Jesse Glick 2005-08-26 08:14:32 UTC
It seems that just using the TAX module means that $userdir/config/.nbattrs gets
an entry

<fileobject name="">
    <attr
name="Services\Hidden\org-netbeans-modules-xml-tax-LayerInstall$TAXProvider.instance\instanceOf"
stringvalue="org.netbeans.modules.xml.core.cookies.CookieFactoryCreator,org.netbeans.modules.xml.core.XMLDataObject$XMLCookieFactoryCreator,org.netbeans.modules.xml.core.DTDDataObject$DTDCookieFactoryCreator,org.netbeans.modules.xml.tax.LayerInstall$TAXProvider"/>
</fileobject>

Should be fixed to declare the correct instanceOf.

Better yet, stop using the layer for this and use META-INF/services.
Comment 1 Jesse Glick 2005-08-26 09:59:11 UTC
I will change InstanceDataObject to not write this attr any more. But it would
still probably be better to use M-I/s. Less overhead, easier to unit test, etc.
Comment 2 Jesse Glick 2005-08-26 12:35:32 UTC
Should no longer write the attr:

committed     Up-To-Date  1.24       
openide/loaders/src/org/openide/loaders/InstanceDataObject.java
Comment 3 Samaresh Panda 2008-11-17 18:11:03 UTC
Doesn't seem to be an issue by looking at 6.1, 6.5 userdirs.
Comment 4 Jesse Glick 2008-11-17 18:40:21 UTC
True, but please still change Services/Hidden/org-netbeans-modules-xml-tax-LayerInstall$TAXProvider.instance to use
M-I/s registration (perhaps using @ServiceProvider). (You can also make TAXProvider a top-level class and delete
LayerInstall.)