Commit 2afced11 by Tom Tromey Committed by Tom Tromey

AbstractPreferences.java (isUserNode): Implemented.

	* java/util/prefs/AbstractPreferences.java (isUserNode):
	Implemented.

From-SVN: r63382
parent 2d21f7d6
2003-02-24 Tom Tromey <tromey@redhat.com> 2003-02-24 Tom Tromey <tromey@redhat.com>
* java/util/prefs/AbstractPreferences.java (isUserNode):
Implemented.
2003-02-24 Tom Tromey <tromey@redhat.com>
* java/lang/ClassLoader.java (defineClass(byte[],int,int)): * java/lang/ClassLoader.java (defineClass(byte[],int,int)):
Deprecate. Deprecate.
* java/lang/Thread.java (resume): Deprecate. * java/lang/Thread.java (resume): Deprecate.
......
/* AbstractPreferences - Partial implementation of a Preference node /* AbstractPreferences - Partial implementation of a Preference node
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -51,8 +51,6 @@ import gnu.java.util.prefs.NodeWriter; ...@@ -51,8 +51,6 @@ import gnu.java.util.prefs.NodeWriter;
/** /**
* Partial implementation of a Preference node. * Partial implementation of a Preference node.
* *
* Methods that still need to be implemented are <code>isUserNode(), XXX
*
* @since 1.4 * @since 1.4
* @author Mark Wielaard (mark@klomp.org) * @author Mark Wielaard (mark@klomp.org)
*/ */
...@@ -158,7 +156,12 @@ public abstract class AbstractPreferences extends Preferences { ...@@ -158,7 +156,12 @@ public abstract class AbstractPreferences extends Preferences {
* Returns true if this node comes from the user preferences tree, false * Returns true if this node comes from the user preferences tree, false
* if it comes from the system preferences tree. * if it comes from the system preferences tree.
*/ */
abstract public boolean isUserNode(); public boolean isUserNode() {
AbstractPreferences root = this;
while (root.parent != null)
root = root.parent;
return root == Preferences.userRoot();
}
/** /**
* Returns the name of this preferences node. The name of the node cannot * Returns the name of this preferences node. The name of the node cannot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment