Commit 2a352ff1 by Michael Koch Committed by Michael Koch

AbstractPreferences.java, [...]: Reworked imports, removed unused imports.

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.

From-SVN: r68081
parent 12d08f3a
2003-06-17 Michael Koch <konqueror@gmx.de> 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: * gnu/java/security/x509/X509Certificate.java:
Explicitely import used classes. Explicitely import used classes.
......
...@@ -35,17 +35,15 @@ this exception to your version of the library, but you are not ...@@ -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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.util.prefs; package java.util.prefs;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.Iterator; import java.util.Iterator;
import java.util.HashMap; import java.util.HashMap;
import java.util.TreeSet; import java.util.TreeSet;
import gnu.java.util.prefs.NodeWriter; import gnu.java.util.prefs.NodeWriter;
/** /**
......
...@@ -238,10 +238,10 @@ public abstract class Preferences { ...@@ -238,10 +238,10 @@ public abstract class Preferences {
* @exception SecurityException when a security manager is installed and * @exception SecurityException when a security manager is installed and
* the caller does not have <code>RuntimePermission("preferences")</code>. * the caller does not have <code>RuntimePermission("preferences")</code>.
*/ */
public static Preferences systemNodeForPackage(Object o) public static Preferences systemNodeForPackage(Class c)
throws SecurityException throws SecurityException
{ {
return nodeForPackage(o, systemRoot()); return nodeForPackage(c, systemRoot());
} }
/** /**
...@@ -257,10 +257,10 @@ public abstract class Preferences { ...@@ -257,10 +257,10 @@ public abstract class Preferences {
* @exception SecurityException when a security manager is installed and * @exception SecurityException when a security manager is installed and
* the caller does not have <code>RuntimePermission("preferences")</code>. * the caller does not have <code>RuntimePermission("preferences")</code>.
*/ */
public static Preferences userNodeForPackage(Object o) public static Preferences userNodeForPackage(Class c)
throws SecurityException throws SecurityException
{ {
return nodeForPackage(o, userRoot()); return nodeForPackage(c, userRoot());
} }
/** /**
...@@ -269,9 +269,9 @@ public abstract class Preferences { ...@@ -269,9 +269,9 @@ public abstract class Preferences {
* root it returns the correct Preference node for the package node name * root it returns the correct Preference node for the package node name
* of the given object. * of the given object.
*/ */
private static Preferences nodeForPackage(Object o, Preferences root) { private static Preferences nodeForPackage(Class c, Preferences root) {
// Get the package path // Get the package path
String className = o.getClass().getName(); String className = c.getName();
String packagePath; String packagePath;
int index = className.lastIndexOf('.'); int index = className.lastIndexOf('.');
if(index == -1) { if(index == -1) {
......
...@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not ...@@ -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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ 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 * Preferences system and user root factory interface. Defines how to get
......
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