There is a misleading typo in the method comments for the methods:
Preferences.userNodeForPackage(Class c);
Preferences.systemNodeForPackage(Class c);
The last line of the first paragraph in both classes says:
For example the absolute path name of the node associated with
the class <tt>com.acme.widget</tt> is <tt>/com/acme/widget</tt>.
Since the last name in a class name is the class itself, and since
these methods are creating Preferences for the package, not the
class, the node path name indicated there is one name too long.
Preferences.userNodeForPackage(Class c);
Preferences.systemNodeForPackage(Class c);
The last line of the first paragraph in both classes says:
For example the absolute path name of the node associated with
the class <tt>com.acme.widget</tt> is <tt>/com/acme/widget</tt>.
Since the last name in a class name is the class itself, and since
these methods are creating Preferences for the package, not the
class, the node path name indicated there is one name too long.
- duplicates
-
JDK-4791036 (prefs) documentation error in Preferences.userNodeForPackage() & systemNodeForPackage()
-
- Closed
-