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]

FYI: Patch: java.util.prefs


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to trunk to fix three methods in 
java.util.prefs.Preferences and some imports.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+7xI4WSOgCCdjSDsRAhOkAJ9VuXSOgSYSzyN+J9174fkDXdd+fACgmRhM
Bjgz4BHKNegYn2ZuuL8WefI=
=CSxQ
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1950
diff -u -b -B -r1.1950 ChangeLog
--- ChangeLog	17 Jun 2003 12:57:34 -0000	1.1950
+++ ChangeLog	17 Jun 2003 13:00:55 -0000
@@ -1,5 +1,15 @@
 2003-06-17  Michael Koch  <konqueror@gmx.de>
 
+	* java/util/prefs/AbstractPreferences.java,
+	java/util/prefs/PreferencesFactory.java:
+	Reworked imports, removed unused imports.
+	* java/util/prefs/Preferences.java
+	(systemNodeForPackage): Method takes a Class not an Object.
+	(userNodeForPackage): Likewise.
+	(nodeForPackage): Likewise.
+
+2003-06-17  Michael Koch  <konqueror@gmx.de>
+
 	* gnu/java/security/x509/X509Certificate.java:
 	Explicitely import used classes.
 
Index: java/util/prefs/AbstractPreferences.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/prefs/AbstractPreferences.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 AbstractPreferences.java
--- java/util/prefs/AbstractPreferences.java	24 Feb 2003 21:20:19 -0000	1.2
+++ java/util/prefs/AbstractPreferences.java	17 Jun 2003 13:00:56 -0000
@@ -39,9 +40,7 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
-
 import java.util.Iterator;
 import java.util.HashMap;
 import java.util.TreeSet;
Index: java/util/prefs/Preferences.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/prefs/Preferences.java,v
retrieving revision 1.1
diff -u -b -B -r1.1 Preferences.java
--- java/util/prefs/Preferences.java	13 Feb 2003 07:45:58 -0000	1.1
+++ java/util/prefs/Preferences.java	17 Jun 2003 13:00:56 -0000
@@ -238,10 +238,10 @@
      * @exception SecurityException when a security manager is installed and
      * the caller does not have <code>RuntimePermission("preferences")</code>.
      */
-    public static Preferences systemNodeForPackage(Object o)
+    public static Preferences systemNodeForPackage(Class c)
             throws SecurityException
     {
-        return nodeForPackage(o, systemRoot());
+        return nodeForPackage(c, systemRoot());
     }
 
     /**
@@ -257,10 +257,10 @@
      * @exception SecurityException when a security manager is installed and
      * the caller does not have <code>RuntimePermission("preferences")</code>.
      */
-    public static Preferences userNodeForPackage(Object o)
+    public static Preferences userNodeForPackage(Class c)
             throws SecurityException
     {
-        return nodeForPackage(o, userRoot());
+        return nodeForPackage(c, userRoot());
     }
 
     /**
@@ -269,9 +269,9 @@
      * root it returns the correct Preference node for the package node name
      * of the given object.
      */
-    private static Preferences nodeForPackage(Object o, Preferences root) {
+    private static Preferences nodeForPackage(Class c, Preferences root) {
         // Get the package path
-        String className = o.getClass().getName();
+        String className = c.getName();
         String packagePath;
         int index = className.lastIndexOf('.');
         if(index == -1) {
Index: java/util/prefs/PreferencesFactory.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/prefs/PreferencesFactory.java,v
retrieving revision 1.1
diff -u -b -B -r1.1 PreferencesFactory.java
--- java/util/prefs/PreferencesFactory.java	13 Feb 2003 07:45:58 -0000	1.1
+++ java/util/prefs/PreferencesFactory.java	17 Jun 2003 13:00:56 -0000
@@ -35,9 +35,8 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
-package java.util.prefs;
 
-import java.util.EventListener;
+package java.util.prefs;
 
 /**
  * Preferences system and user root factory interface. Defines how to get

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