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

Summary: Superfluous folder created for each preferences node
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: rmatous <rmatous>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 73474    

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