diff options
Diffstat (limited to 'libjava/classpath/gnu/java/util/prefs')
9 files changed, 67 insertions, 67 deletions
diff --git a/libjava/classpath/gnu/java/util/prefs/FileBasedFactory.java b/libjava/classpath/gnu/java/util/prefs/FileBasedFactory.java index e5f24efa3a0..91ea861c40e 100644 --- a/libjava/classpath/gnu/java/util/prefs/FileBasedFactory.java +++ b/libjava/classpath/gnu/java/util/prefs/FileBasedFactory.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/gnu/java/util/prefs/FileBasedPreferences.java b/libjava/classpath/gnu/java/util/prefs/FileBasedPreferences.java index f7566dddddf..f89ed6be21e 100644 --- a/libjava/classpath/gnu/java/util/prefs/FileBasedPreferences.java +++ b/libjava/classpath/gnu/java/util/prefs/FileBasedPreferences.java @@ -57,7 +57,7 @@ import java.util.prefs.BackingStoreException; * beneath the user's home directory. The preferences for the node are * stored in a single properties file in that directory. Sub-nodes are * stored in subdirectories. This implementation uses file locking to - * mediate access to the properties files. + * mediate access to the properties files. */ public class FileBasedPreferences extends AbstractPreferences @@ -217,7 +217,7 @@ public class FileBasedPreferences { // Write the underlying file. directory.mkdirs(); - + FileOutputStream fos = null; FileLock lock = null; try diff --git a/libjava/classpath/gnu/java/util/prefs/GConfBasedFactory.java b/libjava/classpath/gnu/java/util/prefs/GConfBasedFactory.java index ae734b60985..f5a189471de 100644 --- a/libjava/classpath/gnu/java/util/prefs/GConfBasedFactory.java +++ b/libjava/classpath/gnu/java/util/prefs/GConfBasedFactory.java @@ -43,7 +43,7 @@ import java.util.prefs.PreferencesFactory; /** * Factory object that generates a Preferences nodes that are read from a GConf * daemon. - * + * * @author Mario Torre <neugens@limasoftware.net> */ public class GConfBasedFactory implements PreferencesFactory @@ -58,7 +58,7 @@ public class GConfBasedFactory implements PreferencesFactory /** * Returns the system root preference node. - * + * * @see java.util.prefs.PreferencesFactory#systemRoot() */ public Preferences systemRoot() @@ -68,7 +68,7 @@ public class GConfBasedFactory implements PreferencesFactory /** * Returns the user root preference node corresponding to the calling user. - * + * * @see java.util.prefs.PreferencesFactory#userRoot() */ public Preferences userRoot() diff --git a/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java b/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java index c26fe63c9b6..e3374eee984 100644 --- a/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java +++ b/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java @@ -54,22 +54,22 @@ import java.util.prefs.BackingStoreException; * <br /> * User Root:<br /> * <br /> - * + * * <pre> * gnu.java.util.prefs.gconf.user_root * </pre> - * + * * <br /> * <br /> * and System Root:<br /> * <br /> - * + * * <pre> * gnu.java.util.prefs.gconf.system_root * </pre> - * + * * <br /> - * + * * @author Mario Torre <neugens@limasoftware.net> */ public class GConfBasedPreferences @@ -115,7 +115,7 @@ public class GConfBasedPreferences * Creates a new preference node given a parent node and a name, which has to * be relative to its parent. When <code>isUser</code> is true it will be user * node otherwise it will be a system node. - * + * * @param parent The parent node of this newly created node. * @param name A name relative to the parent node. * @param isUser Set to <code>true</code> initializes this node to be @@ -142,7 +142,7 @@ public class GConfBasedPreferences absolutePath = absolutePath.substring(0, index + 1); absolutePath = absolutePath + GConfNativePeer.escapeString(name); } - + this.node = this.getRealRoot(isUser) + absolutePath; boolean nodeExist = backend.nodeExist(this.node); @@ -153,7 +153,7 @@ public class GConfBasedPreferences /** * Returns a child node with the given name. * If the child node does not exists, it will be created. - * + * * @param name The name of the requested node. * @return A new reference to the node, creating the node if it is necessary. */ @@ -162,10 +162,10 @@ public class GConfBasedPreferences // we don't check anything here, if the node is a new node this will be // detected in the constructor, so we simply return a new reference to // the requested node. - + GConfBasedPreferences preferenceNode = new GConfBasedPreferences(this, name, this.isUser); - + return preferenceNode; } @@ -173,7 +173,7 @@ public class GConfBasedPreferences * Returns an array of names of the children of this preference node. * If the current node does not have children, the returned array will be * of <code>size</code> 0 (that is, not <code>null</code>). - * + * * @return A <code>String</code> array of names of children of the current * node. * @throws BackingStoreException if this operation cannot be completed. @@ -192,7 +192,7 @@ public class GConfBasedPreferences * GConf handles this for us asynchronously. More over, both sync and flush * have the same meaning in this class, so calling sync has exactly the same * effect. - * + * * @see #sync * @throws BackingStoreException if this operation cannot be completed. */ @@ -203,7 +203,7 @@ public class GConfBasedPreferences /** * Request a flush. - * + * * @see #flush * @throws BackingStoreException if this operation cannot be completed. */ @@ -216,7 +216,7 @@ public class GConfBasedPreferences * Returns all of the key in this preference node. * If the current node does not have preferences, the returned array will be * of size zero. - * + * * @return A <code>String</code> array of keys stored under the current * node. * @throws BackingStoreException if this operation cannot be completed. @@ -233,7 +233,7 @@ public class GConfBasedPreferences /** * Does a recursive postorder traversal of the preference tree, starting from * the given directory invalidating every preference found in the node. - * + * * @param directory The name of the starting directory (node) */ private void postorderRemove(String directory) @@ -271,7 +271,7 @@ public class GConfBasedPreferences /** * Stores the given key-value pair into this preference node. - * + * * @param key The key of this preference. * @param value The value of this preference. */ @@ -293,7 +293,7 @@ public class GConfBasedPreferences /** * Removes the given key from this preference node. * If the key does not exist, no operation is performed. - * + * * @param key The key to remove. */ protected void removeSpi(String key) @@ -305,7 +305,7 @@ public class GConfBasedPreferences * Suggest a sync to the backend. Actually, this is only a suggestion as GConf * handles this for us asynchronously. More over, both sync and flush have the * same meaning in this class, so calling flush has exactly the same effect. - * + * * @see #flush * @throws BackingStoreException if this operation cannot be completed due to * a failure in the backing store, or inability to communicate with @@ -318,7 +318,7 @@ public class GConfBasedPreferences /** * Request a sync. - * + * * @see #sync * @throws BackingStoreException if this operation cannot be completed due to * a failure in the backing store, or inability to communicate with @@ -333,7 +333,7 @@ public class GConfBasedPreferences * Returns the value of the given key. * If the keys does not have a value, or there is an error in the backing * store, <code>null</code> is returned instead. - * + * * @param key The key to retrieve. * @return The value associated with the given key. */ @@ -345,7 +345,7 @@ public class GConfBasedPreferences /** * Returns <code>true</code> if this preference node is a user node, * <code>false</code> if is a system preference node. - * + * * @return <code>true</code> if this preference node is a user node, * <code>false</code> if is a system preference node. */ @@ -360,18 +360,18 @@ public class GConfBasedPreferences /** * Builds a GConf key string suitable for operations on the backend. - * + * * @param key The key to convert into a valid GConf key. * @return A valid Gconf key. */ private String getGConfKey(String key) { String nodeName = ""; - + // strip key // please, note that all names are unescaped into the native peer key = GConfNativePeer.escapeString(key); - + if (this.node.endsWith("/")) { nodeName = this.node + key; @@ -380,13 +380,13 @@ public class GConfBasedPreferences { nodeName = this.node + "/" + key; } - + return nodeName; } /** * Builds the root node to use for this preference. - * + * * @param isUser Defines if this node is a user (<code>true</code>) or system * (<code>false</code>) node. * @return The real root of this preference tree. diff --git a/libjava/classpath/gnu/java/util/prefs/MemoryBasedFactory.java b/libjava/classpath/gnu/java/util/prefs/MemoryBasedFactory.java index 275b8796ec6..32ed12fc795 100644 --- a/libjava/classpath/gnu/java/util/prefs/MemoryBasedFactory.java +++ b/libjava/classpath/gnu/java/util/prefs/MemoryBasedFactory.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/gnu/java/util/prefs/MemoryBasedPreferences.java b/libjava/classpath/gnu/java/util/prefs/MemoryBasedPreferences.java index dc82379160b..ee184d182d3 100644 --- a/libjava/classpath/gnu/java/util/prefs/MemoryBasedPreferences.java +++ b/libjava/classpath/gnu/java/util/prefs/MemoryBasedPreferences.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/gnu/java/util/prefs/NodeReader.java b/libjava/classpath/gnu/java/util/prefs/NodeReader.java index ae5510e1c13..0a49fc777d7 100644 --- a/libjava/classpath/gnu/java/util/prefs/NodeReader.java +++ b/libjava/classpath/gnu/java/util/prefs/NodeReader.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 @@ -128,7 +128,7 @@ public class NodeReader { readNodes(subnode); skipTill("</node>"); } - + } private void readMap(Preferences node) @@ -169,7 +169,7 @@ public class NodeReader { while(true) { if (line == null) throw new InvalidPreferencesFormatException(s + " not found"); - + int index = line.indexOf(s); if (index == -1) { line = br.readLine(); @@ -199,7 +199,7 @@ public class NodeReader { while(true) { if (line == null) throw new InvalidPreferencesFormatException("unexpected EOF"); - + int start = line.indexOf("<"); if (start == -1) { line = br.readLine(); diff --git a/libjava/classpath/gnu/java/util/prefs/NodeWriter.java b/libjava/classpath/gnu/java/util/prefs/NodeWriter.java index d3c09535147..3e4f972edc6 100644 --- a/libjava/classpath/gnu/java/util/prefs/NodeWriter.java +++ b/libjava/classpath/gnu/java/util/prefs/NodeWriter.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 @@ -271,7 +271,7 @@ public class NodeWriter { } } - private void writeMap(Preferences node, int indent) + private void writeMap(Preferences node, int indent) throws BackingStoreException, IOException { // construct String used for indentation diff --git a/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java b/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java index 3c029195989..64fc0498aaf 100644 --- a/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java +++ b/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java @@ -43,7 +43,7 @@ import java.util.prefs.BackingStoreException; /** * Native peer for GConf based preference backend. - * + * * @author Mario Torre <neugens@limasoftware.net> */ public final class GConfNativePeer @@ -59,7 +59,7 @@ public final class GConfNativePeer /** * Queries whether the node <code>node</code> exists in theGConf database. * Returns <code>true</code> or <code>false</code>. - * + * * @param node the node to check. */ public boolean nodeExist(String node) @@ -72,7 +72,7 @@ public final class GConfNativePeer * exist before (ie it was unset or it only had a default value). * Key names must be valid GConf key names, that is, there can be more * restrictions than for normal Preference Backend. - * + * * @param key the key to alter (or add). * @param value the new value for this key. * @return true if the key was updated, false otherwise. @@ -86,7 +86,7 @@ public final class GConfNativePeer * Unsets the value of key; if key is already unset, has no effect. Depending * on the GConf daemon, unsetting a key may have the side effect to remove it * completely form the database. - * + * * @param key the key to unset. * @return true on success, false if the key was not updated. */ @@ -97,7 +97,7 @@ public final class GConfNativePeer /** * Gets the value of a configuration key. - * + * * @param key the configuration key. * @return the values of this key, null if the key is not valid. */ @@ -110,7 +110,7 @@ public final class GConfNativePeer * Lists the key in the given node. Does not list subnodes. Keys names are the * stripped names (name relative to the current node) of the keys stored in * this node. - * + * * @param node the node where keys are stored. * @return a java.util.List of keys. If there are no keys in the given node, a * list of size 0 is returned. @@ -123,7 +123,7 @@ public final class GConfNativePeer /** * Lists the subnodes in <code>node</code>. The returned list contains * allocated strings. Each string is the name relative tho the given node. - * + * * @param node the node to get subnodes from. If there are no subnodes in the * given node, a list of size 0 is returned. */ @@ -139,7 +139,7 @@ public final class GConfNativePeer { return gconf_escape_key(plain); } - + /** * Unescape a string escaped with {@link #escapeString}. */ @@ -147,7 +147,7 @@ public final class GConfNativePeer { return gconf_unescape_key(escaped); } - + /** * Suggest to the backend GConf daemon to synch with the database. */ @@ -155,7 +155,7 @@ public final class GConfNativePeer { gconf_suggest_sync(); } - + protected void finalize() throws Throwable { try @@ -181,7 +181,7 @@ public final class GConfNativePeer * It is meant to be used by the static initializer. */ native synchronized static final private void init_id_cache(); - + /** * Initialize the GConf native peer. This is meant to be used by the * class constructor. @@ -196,7 +196,7 @@ public final class GConfNativePeer /** * Queries the GConf database to see if the given node exists, returning * true if the node exist, false otherwise. - * + * * @param node the node to query for existence. * @return true if the node exist, false otherwise. */ @@ -206,7 +206,7 @@ public final class GConfNativePeer /** * Sets the given key/value pair into the GConf database. * The key must be a valid GConf key. - * + * * @param key the key to store in the GConf database * @param value the value to associate to the given key. * @return true if the change has effect, false otherwise. @@ -217,7 +217,7 @@ public final class GConfNativePeer /** * Returns the key associated to the given key. Null is returned if the * key is not valid. - * + * * @param key the key to return the value of. * @return The value associated to the given key, or null. */ @@ -226,7 +226,7 @@ public final class GConfNativePeer /** * Usets the given key, removing the key from the database. - * + * * @param key the key to remove. * @return true if the operation success, false otherwise. */ @@ -238,46 +238,46 @@ public final class GConfNativePeer */ native synchronized static final protected void gconf_suggest_sync() throws BackingStoreException; - + /** * Returns a list of all nodes under the given node. - * + * * @param node the source node. * @return A list of nodes under the given source node. */ native static synchronized final protected List<String> gconf_all_nodes(String node) throws BackingStoreException; - + /** * Returns a list of all keys stored in the given node. - * + * * @param node the source node. * @return A list of all keys stored in the given node. */ - native synchronized + native synchronized static final protected List<String> gconf_all_keys(String node) throws BackingStoreException; /** * Escape the input String so that it's a valid element for GConf. - * + * * @param plain the String to escape. * @return An escaped String for use with GConf. */ - native synchronized + native synchronized static final protected String gconf_escape_key(String plain); - + /** * Converts a string escaped with gconf_escape_key back into its * original form. - * - * @param escaped key as returned by gconf_escape_key + * + * @param escaped key as returned by gconf_escape_key * @return An unescaped key. */ - native synchronized + native synchronized static final protected String gconf_unescape_key(String escaped); - + static { System.loadLibrary("gconfpeer"); |