summaryrefslogtreecommitdiff
path: root/libjava/java/util
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-17 13:01:21 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-17 13:01:21 +0000
commit395bc3aa91a70e2bf31310866d1d514b33d1b994 (patch)
tree888002df60e702eb7232fc5e202ee467ac2b9123 /libjava/java/util
parent8191922fd3f3f2884aee7393adf3035156895bc8 (diff)
downloadgcc-395bc3aa91a70e2bf31310866d1d514b33d1b994.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util')
-rw-r--r--libjava/java/util/prefs/AbstractPreferences.java4
-rw-r--r--libjava/java/util/prefs/Preferences.java12
-rw-r--r--libjava/java/util/prefs/PreferencesFactory.java3
3 files changed, 8 insertions, 11 deletions
diff --git a/libjava/java/util/prefs/AbstractPreferences.java b/libjava/java/util/prefs/AbstractPreferences.java
index d192c1f6717..a6a3e9a82f2 100644
--- a/libjava/java/util/prefs/AbstractPreferences.java
+++ b/libjava/java/util/prefs/AbstractPreferences.java
@@ -35,17 +35,15 @@ this exception to your version of the library, but you are not
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.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;
-
import gnu.java.util.prefs.NodeWriter;
/**
diff --git a/libjava/java/util/prefs/Preferences.java b/libjava/java/util/prefs/Preferences.java
index 8705b77191c..af2535966be 100644
--- a/libjava/java/util/prefs/Preferences.java
+++ b/libjava/java/util/prefs/Preferences.java
@@ -238,10 +238,10 @@ public abstract class Preferences {
* @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 @@ public abstract class Preferences {
* @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 @@ public abstract class Preferences {
* 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) {
diff --git a/libjava/java/util/prefs/PreferencesFactory.java b/libjava/java/util/prefs/PreferencesFactory.java
index f43497894f1..9b2b4129356 100644
--- a/libjava/java/util/prefs/PreferencesFactory.java
+++ b/libjava/java/util/prefs/PreferencesFactory.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
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