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

Summary: $userdir/config/.nbattrs polluted
Product: xml Reporter: Jesse Glick <jglick>
Component: TAXAssignee: issues@xml <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P4    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.)