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 196855 - nb-configuration.xml created just by looking at Spring property panel
Summary: nb-configuration.xml created just by looking at Spring property panel
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Spring (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-18 15:13 UTC by Jesse Glick
Modified: 2011-04-14 08:36 UTC (History)
1 user (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 Jesse Glick 2011-03-18 15:13:39 UTC
In a new Maven project I opened the Properties dialog, made a change in the Sources panel, and flipped through other panels including Spring Framework. Later I noticed a nb-configuration.xml had been created which was empty except for

    <spring-data xmlns="http://www.netbeans.org/ns/spring-data/1">
        <config-files/>
        <config-file-groups/>
    </spring-data>

The panel storage needs to (a) not store anything when no changes are made, (b) not create a <spring-data> if there is nothing to store, (c) delete any existing <spring-data> if all customizations are removed (this should also cause nb-configuration.xml itself to be deleted if there are no other sections).
Comment 1 Martin Fousek 2011-04-12 07:12:21 UTC
Fixed in 3e570ecd4b8d.
Comment 2 Jesse Glick 2011-04-12 13:03:20 UTC
You fixed (b), I guess fixed (a), but did not fix (c). In fact it now appears to be impossible to remove a config file group after adding it, a regression! The fix is in the wrong place; it is ProjectConfigFileManagerImpl.writeConfiguration which needs to be patched.
Comment 3 Quality Engineering 2011-04-13 08:41:13 UTC
Integrated into 'main-golden', will be available in build *201104130401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3e570ecd4b8d
User: Martin Fousek <marfous@netbeans.org>
Log: #196855 - nb-configuration.xml created just by looking at Spring property panel
Comment 4 Martin Fousek 2011-04-13 11:50:10 UTC
All three options should be fixed now. 
http://hg.netbeans.org/web-main/rev/4433886ac11d

There is just one thing that existing projects with nb-configuration.xml and useless "spring-data" tag will not be empty and deleted until any Spring change happened there. On other side it would require to call remove or another AuxiliaryConfiguration method everytime when files and groups would be empty which could be inefficient.
Comment 5 Quality Engineering 2011-04-14 08:36:06 UTC
Integrated into 'main-golden', will be available in build *201104140401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/4433886ac11d
User: Martin Fousek <marfous@netbeans.org>
Log: #196855 - nb-configuration.xml created just by looking at Spring property panel