This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: classpath mergelet


I'm checking this in on the trunk.

This is a minor change I'm bringing over from classpath.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey at redhat dot com>
	* java/util/prefs/AbstractPreferences.java (isUserNode):
	Implemented.

Index: java/util/prefs/AbstractPreferences.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/prefs/AbstractPreferences.java,v
retrieving revision 1.1
diff -u -r1.1 AbstractPreferences.java
--- java/util/prefs/AbstractPreferences.java 13 Feb 2003 07:45:58 -0000 1.1
+++ java/util/prefs/AbstractPreferences.java 24 Feb 2003 21:18:50 -0000
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -51,8 +51,6 @@
 /**
  * Partial implementation of a Preference node.
  *
- * Methods that still need to be implemented are <code>isUserNode(), XXX
- *
  * @since 1.4
  * @author Mark Wielaard (mark at klomp dot org)
  */
@@ -158,7 +156,12 @@
      * Returns true if this node comes from the user preferences tree, false
      * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]