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 87251 - Superfluous folder created for each preferences node
Summary: Superfluous folder created for each preferences node
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 73474
  Show dependency tree
 
Reported: 2006-10-17 02:25 UTC by Jesse Glick
Modified: 2008-12-22 18:54 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 2006-10-17 02:25:09 UTC
If you call NbPreferences.root().node("foo/bar").put("k", "v") you will get a
file (contents "k=v") in $userdir/config/Preferences/foo/bar/prefs.properties. I
would rather expect the path to be
$userdir/config/Preferences/foo/bar.properties. This is especially annoying when
you create children of a Preferences node and then you get e.g.

someDir
  child1
    prefs.properties
  child2
    prefs.properties

which is harder to grasp than the simpler

someDir
  child1.properties
  child2.properties

Creating the extra folders also adds a bit of overhead (RAM, CPU) to the system
filesystem for no reason.
Comment 1 rmatous 2006-10-17 17:20:04 UTC
/cvs/core/startup/src/org/netbeans/core/startup/preferences/PropertiesStorage.java,v
 new revision: 1.4; previous revision: 1.3

/cvs/core/startup/test/unit/src/org/netbeans/core/startup/preferences/TestPropertiesStorage.java,v
 new revision: 1.3; previous revision: 1.2

/cvs/openide/util/src/org/openide/util/doc-files/preferences.html,v  <--  new
revision: 1.6; previous revision: 1.5

/cvs/ide/launcher/upgrade/src/org/netbeans/upgrade/systemoptions/PropertiesStorage.java,v
 new revision: 1.4; previous revision: 1.3
Comment 2 rmatous 2006-10-18 08:50:14 UTC
/cvs/ide/launcher/upgrade/src/org/netbeans/upgrade/systemoptions/PropertiesStorage.java,v
 new revision: 1.5; previous revision: 1.4

/cvs/core/startup/src/org/netbeans/core/startup/preferences/PropertiesStorage.java,v
 new revision: 1.5; previous revision: 1.4

/cvs/core/startup/test/unit/src/org/netbeans/core/startup/preferences/TestPropertiesStorage.java,v
 new revision: 1.4; previous revision: 1.3
Comment 3 Jesse Glick 2006-10-18 23:34:29 UTC
childrenNames() got broken by the patch; correcting.

Checking in src/org/netbeans/core/startup/preferences/PropertiesStorage.java;
/shared/data/ccvs/repository/core/startup/src/org/netbeans/core/startup/preferences/PropertiesStorage.java,v
 <--  PropertiesStorage.java
new revision: 1.6; previous revision: 1.5
done
Checking in
test/unit/src/org/netbeans/core/startup/preferences/TestPropertiesStorage.java;
/shared/data/ccvs/repository/core/startup/test/unit/src/org/netbeans/core/startup/preferences/TestPropertiesStorage.java,v
 <--  TestPropertiesStorage.java
new revision: 1.5; previous revision: 1.4
done