summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/java/util/prefs
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/util/prefs')
-rw-r--r--libjava/classpath/java/util/prefs/AbstractPreferences.java38
-rw-r--r--libjava/classpath/java/util/prefs/NodeChangeEvent.java8
-rw-r--r--libjava/classpath/java/util/prefs/NodeChangeListener.java2
-rw-r--r--libjava/classpath/java/util/prefs/PreferenceChangeEvent.java6
-rw-r--r--libjava/classpath/java/util/prefs/PreferenceChangeListener.java2
-rw-r--r--libjava/classpath/java/util/prefs/Preferences.java31
-rw-r--r--libjava/classpath/java/util/prefs/PreferencesFactory.java2
7 files changed, 44 insertions, 45 deletions
diff --git a/libjava/classpath/java/util/prefs/AbstractPreferences.java b/libjava/classpath/java/util/prefs/AbstractPreferences.java
index 9562e1bbf5b..14fed384adb 100644
--- a/libjava/classpath/java/util/prefs/AbstractPreferences.java
+++ b/libjava/classpath/java/util/prefs/AbstractPreferences.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -118,7 +118,7 @@ public abstract class AbstractPreferences extends Preferences {
/**
* Creates a new AbstractPreferences node with the given parent and name.
- *
+ *
* @param parent the parent of this node or null when this is the root node
* @param name the name of this node, can not be null, only 80 characters
* maximum, must be empty when parent is null and cannot
@@ -174,9 +174,9 @@ public abstract class AbstractPreferences extends Preferences {
*/
public boolean isUserNode() {
AbstractPreferences root = this;
- while (root.parent != null)
- root = root.parent;
- return root == Preferences.userRoot();
+ while (root.parent != null)
+ root = root.parent;
+ return root == Preferences.userRoot();
}
/**
@@ -238,7 +238,7 @@ public abstract class AbstractPreferences extends Preferences {
// First get all cached node names
childrenNames.addAll(childCache.keySet());
-
+
// Then add any others
String names[] = childrenNamesSpi();
for (int i = 0; i < names.length; i++) {
@@ -339,7 +339,7 @@ public abstract class AbstractPreferences extends Preferences {
if (child == null) {
if (childName.length() > MAX_NAME_LENGTH)
- throw new IllegalArgumentException(childName);
+ throw new IllegalArgumentException(childName);
// Not in childCache yet so create a new sub node
child = childSpi(childName);
@@ -457,7 +457,7 @@ public abstract class AbstractPreferences extends Preferences {
for (int i=0; i < names.length; i++)
if (name.equals(names[i]))
return childSpi(name);
-
+
// No child with that name found
return null;
}
@@ -523,8 +523,8 @@ public abstract class AbstractPreferences extends Preferences {
* This method locks this node and checks if the node has not been
* removed, if it has been removed it throws an exception, then it returns
* the result of calling <code>keysSpi()</code>.
- *
- * @exception BackingStoreException when the backing store cannot be
+ *
+ * @exception BackingStoreException when the backing store cannot be
* reached
* @exception IllegalStateException if this node has been removed
*/
@@ -597,7 +597,7 @@ public abstract class AbstractPreferences extends Preferences {
if ("false".equalsIgnoreCase(value))
return false;
-
+
return defaultVal;
}
@@ -625,7 +625,7 @@ public abstract class AbstractPreferences extends Preferences {
else
return defaultVal;
}
-
+
/**
* Helper method for decoding a Base64 string as an byte array.
* Returns null on encoding error. This method does not allow any other
@@ -807,7 +807,7 @@ public abstract class AbstractPreferences extends Preferences {
if (preferenceListeners != null)
fire(new PreferenceChangeEvent(this, key, value));
}
-
+
}
/**
@@ -948,7 +948,7 @@ public abstract class AbstractPreferences extends Preferences {
/**
* Removes the preferences entry from this preferences node.
- * <p>
+ * <p>
* The result will be immediately visible in this VM, but may not be
* immediately written to the backing store.
* <p>
@@ -1040,7 +1040,7 @@ public abstract class AbstractPreferences extends Preferences {
public void sync() throws BackingStoreException {
flushNode(true);
}
-
+
/**
* Private helper method that locks this node and calls either
@@ -1247,7 +1247,7 @@ public abstract class AbstractPreferences extends Preferences {
listener.preferenceChange(event);
}
};
-
+
Executor executor =
Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory());
executor.execute(dispatcher);
@@ -1273,7 +1273,7 @@ public abstract class AbstractPreferences extends Preferences {
listener.childRemoved(event);
}
};
-
+
Executor executor =
Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory());
executor.execute(dispatcher);
@@ -1316,11 +1316,11 @@ public abstract class AbstractPreferences extends Preferences {
* not been removed. May throw an exception when the backing store cannot
* be accessed.
*
- * @exception BackingStoreException when the backing store cannot be
+ * @exception BackingStoreException when the backing store cannot be
* reached
*/
protected abstract String[] keysSpi() throws BackingStoreException;
-
+
/**
* Returns the value associated with the key in this preferences node or
* null when the key does not exist in this preferences node.
diff --git a/libjava/classpath/java/util/prefs/NodeChangeEvent.java b/libjava/classpath/java/util/prefs/NodeChangeEvent.java
index 8c48fb29f9e..5bdeb334664 100644
--- a/libjava/classpath/java/util/prefs/NodeChangeEvent.java
+++ b/libjava/classpath/java/util/prefs/NodeChangeEvent.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -58,8 +58,8 @@ import java.util.EventObject;
public class NodeChangeEvent extends EventObject {
// We have this to placate the compiler.
- private static final long serialVersionUID =8068949086596572957L;
-
+ private static final long serialVersionUID =8068949086596572957L;
+
/**
* The sub node that was added or removed.
* Defined transient just like <code>EventObject.source</code> since
@@ -102,7 +102,7 @@ public class NodeChangeEvent extends EventObject {
{
throw new NotSerializableException("LineEvent is not serializable");
}
-
+
private void writeObject(ObjectOutputStream oos)
throws IOException
{
diff --git a/libjava/classpath/java/util/prefs/NodeChangeListener.java b/libjava/classpath/java/util/prefs/NodeChangeListener.java
index 19664c6652d..8d018ab6721 100644
--- a/libjava/classpath/java/util/prefs/NodeChangeListener.java
+++ b/libjava/classpath/java/util/prefs/NodeChangeListener.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java b/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java
index 41c3a478c71..f273361e19e 100644
--- a/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java
+++ b/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -62,7 +62,7 @@ public class PreferenceChangeEvent extends EventObject {
// We have this to placate the compiler.
private static final long serialVersionUID = 793724513368024975L;
-
+
/**
* The key of the changed entry.
*/
@@ -116,7 +116,7 @@ public class PreferenceChangeEvent extends EventObject {
{
throw new NotSerializableException("LineEvent is not serializable");
}
-
+
private void writeObject(ObjectOutputStream oos)
throws IOException
{
diff --git a/libjava/classpath/java/util/prefs/PreferenceChangeListener.java b/libjava/classpath/java/util/prefs/PreferenceChangeListener.java
index adff3582079..e6118bc31ed 100644
--- a/libjava/classpath/java/util/prefs/PreferenceChangeListener.java
+++ b/libjava/classpath/java/util/prefs/PreferenceChangeListener.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/libjava/classpath/java/util/prefs/Preferences.java b/libjava/classpath/java/util/prefs/Preferences.java
index e8cdda8ed0a..3ff9c85e349 100644
--- a/libjava/classpath/java/util/prefs/Preferences.java
+++ b/libjava/classpath/java/util/prefs/Preferences.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -213,28 +213,28 @@ public abstract class Preferences {
{
Iterator iter = ServiceFactory.lookupProviders
(PreferencesFactory.class, null);
-
+
if (iter != null && iter.hasNext())
factory = (PreferencesFactory) iter.next();
}
-
+
// Still no factory? Use our default.
if (factory == null)
- {
+ {
try
- {
+ {
Class cls = Class.forName (defaultFactoryClass);
factory = (PreferencesFactory) cls.newInstance();
}
- catch (Exception e)
- {
+ catch (Exception e)
+ {
throw new RuntimeException ("Couldn't load default factory"
+ " '"+ defaultFactoryClass +"'", e);
}
}
}
-
+
return factory;
}
@@ -305,7 +305,7 @@ public abstract class Preferences {
* @throws InvalidPreferencesFormatException if the XML is not properly
* formatted
*/
- public static void importPreferences(InputStream is)
+ public static void importPreferences(InputStream is)
throws InvalidPreferencesFormatException,
IOException
{
@@ -318,7 +318,7 @@ public abstract class Preferences {
/**
* Returns the absolute path name of this preference node.
- * The absolute path name of a node is the path name of its parent node
+ * The absolute path name of a node is the path name of its parent node
* plus a '/' plus its own name. If the node is the root node and has no
* parent then its name is "" and its absolute path name is "/".
*/
@@ -400,8 +400,8 @@ public abstract class Preferences {
// abstract methods (export)
/**
- * Export this node, but not its descendants, as XML to the
- * indicated output stream. The XML will be encoded using UTF-8
+ * Export this node, but not its descendants, as XML to the
+ * indicated output stream. The XML will be encoded using UTF-8
* and will use a specified document type:<br>
* <code>&lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt;</code><br>
* @param os the output stream to which the XML is sent
@@ -414,8 +414,8 @@ public abstract class Preferences {
IOException;
/**
- * Export this node and all its descendants as XML to the
- * indicated output stream. The XML will be encoded using UTF-8
+ * Export this node and all its descendants as XML to the
+ * indicated output stream. The XML will be encoded using UTF-8
* and will use a specified document type:<br>
* <code>&lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt;</code><br>
* @param os the output stream to which the XML is sent
@@ -670,7 +670,7 @@ public abstract class Preferences {
* <p>
* Note that according to the specification an implementation may delay
* removal of the node from the backing store till the <code>flush()</code>
- * method is called. But the <code>flush()</code> method may throw a
+ * method is called. But the <code>flush()</code> method may throw a
* <code>IllegalStateException</code> when the node has been removed.
* So most implementations will actually remove the node and any subnodes
* from the backing store immediatly.
@@ -694,4 +694,3 @@ public abstract class Preferences {
public abstract void removePreferenceChangeListener
(PreferenceChangeListener listener);
}
-
diff --git a/libjava/classpath/java/util/prefs/PreferencesFactory.java b/libjava/classpath/java/util/prefs/PreferencesFactory.java
index f4fe7e37ffe..5674f806d9b 100644
--- a/libjava/classpath/java/util/prefs/PreferencesFactory.java
+++ b/libjava/classpath/java/util/prefs/PreferencesFactory.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
OpenPOWER on IntegriCloud