/[classpath]/classpath/java/util/prefs/Preferences.java
ViewVC logotype

Diff of /classpath/java/util/prefs/Preferences.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mark, Mon May 6 16:19:20 2002 UTC revision 1.4 by mkoch, Wed Jun 18 09:42:57 2003 UTC
# Line 238  public abstract class Preferences { Line 238  public abstract class Preferences {
238       * @exception SecurityException when a security manager is installed and       * @exception SecurityException when a security manager is installed and
239       * the caller does not have <code>RuntimePermission("preferences")</code>.       * the caller does not have <code>RuntimePermission("preferences")</code>.
240       */       */
241      public static Preferences systemNodeForPackage(Object o)      public static Preferences systemNodeForPackage(Class c)
242              throws SecurityException              throws SecurityException
243      {      {
244          return nodeForPackage(o, systemRoot());          return nodeForPackage(c, systemRoot());
245      }      }
246    
247      /**      /**
# Line 257  public abstract class Preferences { Line 257  public abstract class Preferences {
257       * @exception SecurityException when a security manager is installed and       * @exception SecurityException when a security manager is installed and
258       * the caller does not have <code>RuntimePermission("preferences")</code>.       * the caller does not have <code>RuntimePermission("preferences")</code>.
259       */       */
260      public static Preferences userNodeForPackage(Object o)      public static Preferences userNodeForPackage(Class c)
261              throws SecurityException              throws SecurityException
262      {      {
263          return nodeForPackage(o, userRoot());          return nodeForPackage(c, userRoot());
264      }      }
265    
266      /**      /**
# Line 269  public abstract class Preferences { Line 269  public abstract class Preferences {
269       * root it returns the correct Preference node for the package node name       * root it returns the correct Preference node for the package node name
270       * of the given object.       * of the given object.
271       */       */
272      private static Preferences nodeForPackage(Object o, Preferences root) {      private static Preferences nodeForPackage(Class c, Preferences root) {
273          // Get the package path          // Get the package path
274          String className = o.getClass().getName();          String className = c.getName();
275          String packagePath;          String packagePath;
276          int index = className.lastIndexOf('.');          int index = className.lastIndexOf('.');
277          if(index == -1) {          if(index == -1) {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26