summaryrefslogtreecommitdiff
path: root/javax/naming
diff options
context:
space:
mode:
Diffstat (limited to 'javax/naming')
-rw-r--r--javax/naming/AuthenticationException.java4
-rw-r--r--javax/naming/AuthenticationNotSupportedException.java4
-rw-r--r--javax/naming/BinaryRefAddr.java12
-rw-r--r--javax/naming/Binding.java22
-rw-r--r--javax/naming/CannotProceedException.java4
-rw-r--r--javax/naming/CommunicationException.java2
-rw-r--r--javax/naming/CompositeName.java164
-rw-r--r--javax/naming/CompoundName.java284
-rw-r--r--javax/naming/ConfigurationException.java2
-rw-r--r--javax/naming/Context.java72
-rw-r--r--javax/naming/ContextNotEmptyException.java4
-rw-r--r--javax/naming/InitialContext.java114
-rw-r--r--javax/naming/InsufficientResourcesException.java4
-rw-r--r--javax/naming/InterruptedNamingException.java2
-rw-r--r--javax/naming/InvalidNameException.java2
-rw-r--r--javax/naming/LimitExceededException.java4
-rw-r--r--javax/naming/LinkException.java4
-rw-r--r--javax/naming/LinkLoopException.java4
-rw-r--r--javax/naming/MalformedLinkException.java2
-rw-r--r--javax/naming/Name.java8
-rw-r--r--javax/naming/NameAlreadyBoundException.java2
-rw-r--r--javax/naming/NameClassPair.java44
-rw-r--r--javax/naming/NameNotFoundException.java4
-rw-r--r--javax/naming/NameParser.java6
-rw-r--r--javax/naming/NamingEnumeration.java14
-rw-r--r--javax/naming/NamingException.java35
-rw-r--r--javax/naming/NamingSecurityException.java4
-rw-r--r--javax/naming/NoInitialContextException.java2
-rw-r--r--javax/naming/NoPermissionException.java2
-rw-r--r--javax/naming/NotContextException.java2
-rw-r--r--javax/naming/PartialResultException.java2
-rw-r--r--javax/naming/RefAddr.java22
-rw-r--r--javax/naming/Reference.java94
-rw-r--r--javax/naming/Referenceable.java4
-rw-r--r--javax/naming/ReferralException.java4
-rw-r--r--javax/naming/ServiceUnavailableException.java2
-rw-r--r--javax/naming/SizeLimitExceededException.java2
-rw-r--r--javax/naming/StringRefAddr.java2
-rw-r--r--javax/naming/TimeLimitExceededException.java2
-rw-r--r--javax/naming/directory/AttributeInUseException.java2
-rw-r--r--javax/naming/directory/Attributes.java1
-rw-r--r--javax/naming/directory/BasicAttribute.java112
-rw-r--r--javax/naming/directory/BasicAttributes.java46
-rw-r--r--javax/naming/directory/InitialDirContext.java8
-rw-r--r--javax/naming/directory/ModificationItem.java6
-rw-r--r--javax/naming/directory/SearchControls.java4
-rw-r--r--javax/naming/directory/SearchResult.java8
-rw-r--r--javax/naming/event/EventContext.java8
-rw-r--r--javax/naming/event/NamespaceChangeListener.java2
-rw-r--r--javax/naming/event/NamingEvent.java20
-rw-r--r--javax/naming/event/NamingExceptionEvent.java2
-rw-r--r--javax/naming/event/NamingListener.java2
-rw-r--r--javax/naming/event/ObjectChangeListener.java2
-rw-r--r--javax/naming/ldap/Control.java2
-rw-r--r--javax/naming/ldap/ControlFactory.java56
-rw-r--r--javax/naming/ldap/ExtendedRequest.java8
-rw-r--r--javax/naming/ldap/ExtendedResponse.java2
-rw-r--r--javax/naming/ldap/HasControls.java2
-rw-r--r--javax/naming/ldap/InitialLdapContext.java12
-rw-r--r--javax/naming/ldap/LdapContext.java2
-rw-r--r--javax/naming/ldap/LdapReferralException.java2
-rw-r--r--javax/naming/ldap/StartTlsRequest.java2
-rw-r--r--javax/naming/ldap/UnsolicitedNotification.java2
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationEvent.java6
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationListener.java2
-rw-r--r--javax/naming/spi/DirObjectFactory.java6
-rw-r--r--javax/naming/spi/DirStateFactory.java10
-rw-r--r--javax/naming/spi/DirectoryManager.java262
-rw-r--r--javax/naming/spi/InitialContextFactory.java2
-rw-r--r--javax/naming/spi/InitialContextFactoryBuilder.java4
-rw-r--r--javax/naming/spi/NamingManager.java378
-rw-r--r--javax/naming/spi/ObjectFactory.java6
-rw-r--r--javax/naming/spi/ObjectFactoryBuilder.java12
-rw-r--r--javax/naming/spi/ResolveResult.java38
-rw-r--r--javax/naming/spi/Resolver.java6
-rw-r--r--javax/naming/spi/StateFactory.java10
76 files changed, 1009 insertions, 1013 deletions
diff --git a/javax/naming/AuthenticationException.java b/javax/naming/AuthenticationException.java
index 1a6ade930..36310d3ad 100644
--- a/javax/naming/AuthenticationException.java
+++ b/javax/naming/AuthenticationException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class AuthenticationException extends NamingSecurityException
{
private static final long serialVersionUID = 3678497619904568096L;
diff --git a/javax/naming/AuthenticationNotSupportedException.java b/javax/naming/AuthenticationNotSupportedException.java
index a1e811b44..9ebda40bb 100644
--- a/javax/naming/AuthenticationNotSupportedException.java
+++ b/javax/naming/AuthenticationNotSupportedException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class AuthenticationNotSupportedException
extends NamingSecurityException
{
diff --git a/javax/naming/BinaryRefAddr.java b/javax/naming/BinaryRefAddr.java
index 923c48e23..373802a8c 100644
--- a/javax/naming/BinaryRefAddr.java
+++ b/javax/naming/BinaryRefAddr.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
@@ -53,7 +53,7 @@ import java.util.Arrays;
public class BinaryRefAddr extends RefAddr
{
static final long serialVersionUID = -3415254970957330361L;
-
+
/**
* The possibly null content of this RefAddr.
* Set by the constructor and returned by getContent.
@@ -109,7 +109,7 @@ public class BinaryRefAddr extends RefAddr
{
byte[] c1 = (byte[]) this.getContent();
byte[] c2 = (byte[]) refAddr.getContent();
- return Arrays.equals(c1, c2);
+ return Arrays.equals(c1, c2);
}
}
return false;
@@ -133,7 +133,7 @@ public class BinaryRefAddr extends RefAddr
}
private static char[] hex = {'0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
/**
* Returns a String representation of the RefAddr. Only the first 32 bytes
* of the content are added as hex encoded characters.
@@ -147,8 +147,8 @@ public class BinaryRefAddr extends RefAddr
byte[] b = (byte[]) getContent();
for (int i=0; i < b.length && i < 32; i++)
{
- sb.append(hex[(b[i]&0xf0)>>4]);
- sb.append(hex[b[i]&0x0f]);
+ sb.append(hex[(b[i]&0xf0)>>4]);
+ sb.append(hex[b[i]&0x0f]);
}
if (b.length > 32)
sb.append("...");
diff --git a/javax/naming/Binding.java b/javax/naming/Binding.java
index a34f8b329..23bb4592e 100644
--- a/javax/naming/Binding.java
+++ b/javax/naming/Binding.java
@@ -39,14 +39,14 @@ exception statement from your version. */
package javax.naming;
/**
- * <code>Binding</code> represents the name-object mapping of a
+ * <code>Binding</code> represents the name-object mapping of a
* binding in a context.
* <p>
* Bindings are mappings of a name to an object and this class is used to
* specify such mappings. The bindings of a context are retrieved by the
* <code>Context#listBindings()</code> methods.
* </p>
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -56,7 +56,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param obj the bound object
@@ -68,9 +68,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name and object and a
+ * Constructs an instance with the given name and object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param obj the bound object
@@ -84,7 +84,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name, classname and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the classname to set (maybe <code>null</code>)
@@ -97,9 +97,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name, classname, object and a
+ * Constructs an instance with the given name, classname, object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the classname to set (maybe <code>null</code>)
@@ -107,7 +107,7 @@ public class Binding extends NameClassPair
* @param obj the bound object
*/
public Binding (String name, String className, Object obj,
- boolean isRelative)
+ boolean isRelative)
{
super (name, className, isRelative);
boundObj = obj;
@@ -119,7 +119,7 @@ public class Binding extends NameClassPair
* Returns the classname if set explicitly. If not and the bound object is
* not <code>null</code> the classname of the bound object is used.
* </p>
- *
+ *
* @return The fully qualified classname (may be <code>null</code>).
*/
public String getClassName ()
@@ -150,7 +150,7 @@ public class Binding extends NameClassPair
/**
* Returns the string representation.
- * @return The string as given by the NameClassPair superclass plus
+ * @return The string as given by the NameClassPair superclass plus
* the bound objects string representation seperated by a colon.
*/
public String toString ()
diff --git a/javax/naming/CannotProceedException.java b/javax/naming/CannotProceedException.java
index bc2085879..26b1d0b0c 100644
--- a/javax/naming/CannotProceedException.java
+++ b/javax/naming/CannotProceedException.java
@@ -35,11 +35,11 @@ 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 javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/javax/naming/CommunicationException.java b/javax/naming/CommunicationException.java
index 7b11b5fac..485e5cd1d 100644
--- a/javax/naming/CommunicationException.java
+++ b/javax/naming/CommunicationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class CommunicationException extends NamingException
{
private static final long serialVersionUID = 3618507780299986611L;
diff --git a/javax/naming/CompositeName.java b/javax/naming/CompositeName.java
index 4593bae63..7d4d362bd 100644
--- a/javax/naming/CompositeName.java
+++ b/javax/naming/CompositeName.java
@@ -53,14 +53,14 @@ import java.util.Vector;
* the composite name http://www.gnu.org/software/classpath/index.html spans
* over three namespaces (the protocol http, the web server location
* (www.gnu.org) and the index.html location on the server).
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class CompositeName implements Name, Cloneable, Serializable
{
private static final long serialVersionUID = 1667768148915813118L;
-
- private transient Vector<String> elts;
+
+ private transient Vector<String> elts;
public CompositeName ()
{
@@ -72,8 +72,8 @@ public class CompositeName implements Name, Cloneable, Serializable
elts = new Vector<String> ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -84,49 +84,49 @@ public class CompositeName implements Name, Cloneable, Serializable
{
elts = new Vector<String> ();
// Parse the string into its components.
- final char no_quote = 'x'; // Use 'x' to mean no quoting.
+ final char no_quote = 'x'; // Use 'x' to mean no quoting.
char quote = no_quote;
boolean escaped = false;
StringBuilder new_element = new StringBuilder ();
for (int i = 0; i < n.length (); ++i)
{
- char c = n.charAt (i);
- if (escaped)
- escaped = false;
- else if (c == '\\')
- {
- escaped = true;
- continue;
- }
- else if (quote != no_quote)
- {
- if (quote == c)
- {
- // The quotes must surround a complete component.
- if (i + 1 < n.length () && n.charAt (i + 1) != '/')
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- quote = no_quote;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && (c == '\'' || c == '"'))
- {
- quote = c;
- continue;
- }
- else if (c == '/')
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- continue;
- }
-
- new_element.append (c);
+ char c = n.charAt (i);
+ if (escaped)
+ escaped = false;
+ else if (c == '\\')
+ {
+ escaped = true;
+ continue;
+ }
+ else if (quote != no_quote)
+ {
+ if (quote == c)
+ {
+ // The quotes must surround a complete component.
+ if (i + 1 < n.length () && n.charAt (i + 1) != '/')
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ quote = no_quote;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && (c == '\'' || c == '"'))
+ {
+ quote = c;
+ continue;
+ }
+ else if (c == '/')
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ continue;
+ }
+
+ new_element.append (c);
}
if (new_element.length () != 0)
@@ -156,11 +156,11 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration<String> e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -173,8 +173,8 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration<String> e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -195,10 +195,10 @@ public class CompositeName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = elts.get (i);
- int comp = f.compareTo (cn.elts.get (i));
- if (comp != 0)
- return comp;
+ String f = elts.get (i);
+ int comp = f.compareTo (cn.elts.get (i));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -213,8 +213,8 @@ public class CompositeName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (delta + i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (delta + i)))
+ return false;
}
return true;
}
@@ -288,8 +288,8 @@ public class CompositeName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (i)))
+ return false;
}
return true;
}
@@ -299,33 +299,33 @@ public class CompositeName implements Name, Cloneable, Serializable
CPStringBuilder result = new CPStringBuilder ();
for (int i = 0; i < elts.size (); ++i)
{
- // For simplicity we choose to always quote using escapes and
- // never quotes.
- String elt = elts.get (i);
- if (i > 0
- || (i == elts.size () - 1 && elt.equals ("")))
- result.append ('/');
- for (int k = 0; k < elt.length (); ++k)
- {
- char c = elt.charAt (k);
- // We must quote
- // ... a leading quote,
- if ((k == 0 && (c == '"' || c == '\''))
- // ... an escape preceding a meta character,
- // or at the end of a component,
- || (c == '\\'
- && (k == elt.length () - 1
- || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
- // ... or a component separator.
- || c == '/')
- result.append ('\\');
- result.append (c);
- }
+ // For simplicity we choose to always quote using escapes and
+ // never quotes.
+ String elt = elts.get (i);
+ if (i > 0
+ || (i == elts.size () - 1 && elt.equals ("")))
+ result.append ('/');
+ for (int k = 0; k < elt.length (); ++k)
+ {
+ char c = elt.charAt (k);
+ // We must quote
+ // ... a leading quote,
+ if ((k == 0 && (c == '"' || c == '\''))
+ // ... an escape preceding a meta character,
+ // or at the end of a component,
+ || (c == '\\'
+ && (k == elt.length () - 1
+ || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
+ // ... or a component separator.
+ || c == '/')
+ result.append ('\\');
+ result.append (c);
+ }
}
return result.toString ();
}
-
- private void readObject(ObjectInputStream s)
+
+ private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
int size = s.readInt();
diff --git a/javax/naming/CompoundName.java b/javax/naming/CompoundName.java
index 26b44c16f..d410f6a97 100644
--- a/javax/naming/CompoundName.java
+++ b/javax/naming/CompoundName.java
@@ -52,8 +52,8 @@ import java.util.Vector;
/**
* Represents hierarchical names from the single namespace. For instance,
* the path /home/audriusa/classpath/file.txt is the compound name, using
- * the filesystem namespace.
- *
+ * the filesystem namespace.
+ *
* @author Tom Tromey (tromey@redhat.com)
* @date May 16, 2001
*
@@ -82,8 +82,8 @@ public class CompoundName implements Name, Cloneable, Serializable
initializeSyntax ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -104,79 +104,79 @@ public class CompoundName implements Name, Cloneable, Serializable
String quote = null;
while (i < n.length ())
{
- String special = isSpecial (n, i);
-
- if (special == escape && escape != null)
- {
- if (n.length () == i + special.length ())
- {
- // A trailing escape is treated as itself.
- new_element.append (special);
- i += special.length ();
- }
- else
- {
- String eSpecial = isSpecial (n, i + special.length ());
- if (eSpecial != null)
- {
- // Treat the escape as an escape.
- new_element.append (eSpecial);
- i += special.length () + eSpecial.length ();
- }
- else
- {
- // Treat the escape as itself.
- new_element.append (special);
- i += special.length ();
- }
- continue;
- }
- }
- else if (quote != null)
- {
- // It is safe to use == here.
- if (quote == special)
- {
- // Quotes must surround a complete component.
- if (i + quote.length () < n.length ()
- && ! n.startsWith (separator, i + quote.length ()))
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += quote.length ();
- quote = null;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && special == beginQuote
- && beginQuote != null)
- {
- quote = endQuote;
- i += special.length ();
- continue;
- }
- else if (new_element.length () == 0
- && special == beginQuote2
- && beginQuote2 != null)
- {
- quote = endQuote2;
- i += special.length ();
- continue;
- }
- else if (direction != FLAT && special == separator)
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += special.length ();
- continue;
- }
-
- // Nothing in particular, so try the next character.
- new_element.append (n.charAt (i));
- ++i;
+ String special = isSpecial (n, i);
+
+ if (special == escape && escape != null)
+ {
+ if (n.length () == i + special.length ())
+ {
+ // A trailing escape is treated as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ else
+ {
+ String eSpecial = isSpecial (n, i + special.length ());
+ if (eSpecial != null)
+ {
+ // Treat the escape as an escape.
+ new_element.append (eSpecial);
+ i += special.length () + eSpecial.length ();
+ }
+ else
+ {
+ // Treat the escape as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ continue;
+ }
+ }
+ else if (quote != null)
+ {
+ // It is safe to use == here.
+ if (quote == special)
+ {
+ // Quotes must surround a complete component.
+ if (i + quote.length () < n.length ()
+ && ! n.startsWith (separator, i + quote.length ()))
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += quote.length ();
+ quote = null;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && special == beginQuote
+ && beginQuote != null)
+ {
+ quote = endQuote;
+ i += special.length ();
+ continue;
+ }
+ else if (new_element.length () == 0
+ && special == beginQuote2
+ && beginQuote2 != null)
+ {
+ quote = endQuote2;
+ i += special.length ();
+ continue;
+ }
+ else if (direction != FLAT && special == separator)
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += special.length ();
+ continue;
+ }
+
+ // Nothing in particular, so try the next character.
+ new_element.append (n.charAt (i));
+ ++i;
}
if (new_element.length () != 0)
@@ -184,13 +184,13 @@ public class CompoundName implements Name, Cloneable, Serializable
if (direction == RIGHT_TO_LEFT)
{
- // Reverse the order of the elements.
- int len = elts.size ();
- for (i = 0; i < len / 2; ++i)
- {
- String t = elts.set (i, elts.get (len - i - 1));
- elts.set (len - i - 1, t);
- }
+ // Reverse the order of the elements.
+ int len = elts.size ();
+ for (i = 0; i < len / 2; ++i)
+ {
+ String t = elts.set (i, elts.get (len - i - 1));
+ elts.set (len - i - 1, t);
+ }
}
// Error checking.
@@ -215,11 +215,11 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration<String> e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -232,8 +232,8 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration<String> e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -254,10 +254,10 @@ public class CompoundName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = canonicalize (elts.get (i));
- int comp = f.compareTo (canonicalize (cn.elts.get (i)));
- if (comp != 0)
- return comp;
+ String f = canonicalize (elts.get (i));
+ int comp = f.compareTo (canonicalize (cn.elts.get (i)));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -272,9 +272,9 @@ public class CompoundName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (delta + i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (delta + i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -346,9 +346,9 @@ public class CompoundName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -368,7 +368,7 @@ public class CompoundName implements Name, Cloneable, Serializable
else if (endQuote != null && element.startsWith (endQuote, offset))
special = endQuote;
else if (beginQuote2 != null
- && element.startsWith (beginQuote2, offset))
+ && element.startsWith (beginQuote2, offset))
special = beginQuote2;
else if (endQuote2 != null && element.startsWith (endQuote2, offset))
special = endQuote2;
@@ -382,30 +382,30 @@ public class CompoundName implements Name, Cloneable, Serializable
int size = elts.size ();
for (int i = 0; i < size; ++i)
{
- // Find the appropriate element. FIXME: not clear what FLAT
- // means.
- int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
- String element = elts.get (offset);
- if (i > 0
- || (i == size - 1 && element.equals ("")))
- result.append (separator);
-
- int k = 0;
- while (k < element.length ())
- {
- String special = isSpecial (element, k);
- if (special != null)
- {
- result.append (escape);
- result.append (special);
- k += special.length ();
- }
- else
- {
- result.append (element.charAt (k));
- ++k;
- }
- }
+ // Find the appropriate element. FIXME: not clear what FLAT
+ // means.
+ int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
+ String element = elts.get (offset);
+ if (i > 0
+ || (i == size - 1 && element.equals ("")))
+ result.append (separator);
+
+ int k = 0;
+ while (k < element.length ())
+ {
+ String special = isSpecial (element, k);
+ if (special != null)
+ {
+ result.append (escape);
+ result.append (special);
+ k += special.length ();
+ }
+ else
+ {
+ result.append (element.charAt (k));
+ ++k;
+ }
+ }
}
return result.toString ();
@@ -422,17 +422,17 @@ public class CompoundName implements Name, Cloneable, Serializable
if (trimBlanks)
{
- int first = 0;
- while (first < ret.length ()
- && Character.isWhitespace (ret.charAt (first)))
- ++first;
+ int first = 0;
+ while (first < ret.length ()
+ && Character.isWhitespace (ret.charAt (first)))
+ ++first;
- int last = ret.length () - 1;
- while (last >= first
- && Character.isWhitespace (ret.charAt (last)))
- --last;
+ int last = ret.length () - 1;
+ while (last >= first
+ && Character.isWhitespace (ret.charAt (last)))
+ --last;
- ret = ret.substring (first, last);
+ ret = ret.substring (first, last);
}
return ret;
@@ -451,8 +451,8 @@ public class CompoundName implements Name, Cloneable, Serializable
this.direction = LEFT_TO_RIGHT;
else
{
- // If we don't recognize it, default to flat.
- this.direction = FLAT;
+ // If we don't recognize it, default to flat.
+ this.direction = FLAT;
}
// This is required unless the direction is FLAT. Unfortunately
@@ -461,18 +461,18 @@ public class CompoundName implements Name, Cloneable, Serializable
this.ignoreCase
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.ignorecase",
- "false")).booleanValue ();
+ "false")).booleanValue ();
this.escape = mySyntax.getProperty ("jndi.syntax.escape", null);
this.beginQuote = mySyntax.getProperty ("jndi.syntax.beginquote", null);
this.endQuote = mySyntax.getProperty ("jndi.syntax.endquote",
- this.beginQuote);
+ this.beginQuote);
this.beginQuote2 = mySyntax.getProperty ("jndi.syntax.beginquote2",
- null);
+ null);
this.endQuote2 = mySyntax.getProperty ("jndi.syntax.endquote2",
- this.beginQuote2);
+ this.beginQuote2);
this.trimBlanks
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.trimblanks",
- "false")).booleanValue ();
+ "false")).booleanValue ();
}
private void readObject(ObjectInputStream s)
diff --git a/javax/naming/ConfigurationException.java b/javax/naming/ConfigurationException.java
index 1f4002aa4..eb2fbfeec 100644
--- a/javax/naming/ConfigurationException.java
+++ b/javax/naming/ConfigurationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ConfigurationException extends NamingException
{
private static final long serialVersionUID = - 2535156726228855704L;
diff --git a/javax/naming/Context.java b/javax/naming/Context.java
index 4b87b9e01..35217ffc4 100644
--- a/javax/naming/Context.java
+++ b/javax/naming/Context.java
@@ -127,7 +127,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -143,7 +143,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -159,7 +159,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -169,7 +169,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -179,7 +179,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -193,7 +193,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -209,7 +209,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -224,7 +224,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -237,7 +237,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -249,7 +249,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -265,7 +265,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -279,7 +279,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -292,7 +292,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -305,7 +305,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -315,7 +315,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -329,7 +329,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -344,7 +344,7 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
@@ -355,19 +355,19 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
*/
void destroySubcontext(String name) throws NamingException;
-
+
/**
* Retrieves the named object, not following the link of the terminal atomic
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
@@ -380,18 +380,18 @@ public interface Context
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
* @throws NamingException
*/
Object lookupLink(String name) throws NamingException;
-
+
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
@@ -401,17 +401,17 @@ public interface Context
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
*/
NameParser getNameParser(String name) throws NamingException;
-
+
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -424,7 +424,7 @@ public interface Context
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -433,12 +433,12 @@ public interface Context
* @throws NamingException
*/
String composeName(String name, String prefix) throws NamingException;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal.
- *
+ *
* @param propName the name of the new property
* @param propVal the value of the new property
* @return the previous value of this property or null if the property has not
@@ -447,33 +447,33 @@ public interface Context
*/
Object addToEnvironment(String propName, Object propVal)
throws NamingException;
-
+
/**
* Removes the property with the given name from the environment. Returns
* without action if this property is not defined.
- *
+ *
* @param propName the name of the property being removed.
* @return the value of the property that has been removed or null if the
* property was not defined.
* @throws NamingException
*/
Object removeFromEnvironment(String propName) throws NamingException;
-
+
/**
* Returns the environment, associated with this naming context. The returned
* table should never be modified by the caller. Use {@link #addToEnvironment}
* and {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
Hashtable<?,?> getEnvironment() throws NamingException;
-
+
/**
* Releases all resources, associated with this context. The close() method
* can be called several times, but after it has been once invoked, it is not
* allowed to call any other method of this context,
- *
+ *
* @throws NamingException
*/
void close() throws NamingException;
@@ -482,7 +482,7 @@ public interface Context
* Returs the full name of this naming context. The returned string is not a
* JNDI composite name and should not be passed directly to the methods of the
* naming context.
- *
+ *
* @return the full name of this naming context, in its own namespace.
* @throws OperationNotSupportedException if the naming system, represented by
* this context, does not support the notation of the full name.
diff --git a/javax/naming/ContextNotEmptyException.java b/javax/naming/ContextNotEmptyException.java
index e856341c1..816e70312 100644
--- a/javax/naming/ContextNotEmptyException.java
+++ b/javax/naming/ContextNotEmptyException.java
@@ -41,9 +41,9 @@ package javax.naming;
/**
* This exception is thrown in response to the attempt to destroy the non
* empty context. Only empty contexts (without bindings) can be destroyed.
- *
+ *
* @see Context#destroySubcontext
- */
+ */
public class ContextNotEmptyException extends NamingException
{
private static final long serialVersionUID = 1090963683348219877L;
diff --git a/javax/naming/InitialContext.java b/javax/naming/InitialContext.java
index a5fe5f0cf..c33122adf 100644
--- a/javax/naming/InitialContext.java
+++ b/javax/naming/InitialContext.java
@@ -63,18 +63,18 @@ public class InitialContext implements Context
* this field.
*/
protected Context defaultInitCtx;
-
+
/**
* Indicates if the initial context was obtained by calling
- * {@link NamingManager#getInitialContext}.
+ * {@link NamingManager#getInitialContext}.
*/
protected boolean gotDefault = false;
-
+
/**
* The environment, associated with this initial context.
*/
protected Hashtable<Object,Object> myProps;
-
+
/**
* The list of the properties, to that the second alternative value must
* be appended after the colon to the first possible value. Used in
@@ -87,13 +87,13 @@ public class InitialContext implements Context
colon_list.add(Context.OBJECT_FACTORIES);
colon_list.add(Context.URL_PKG_PREFIXES);
colon_list.add(Context.STATE_FACTORIES);
- }
-
+ }
+
/**
* The properties that are searched in the agreed places in the
* {@link #init(Hashtable)} method.
*/
- static final String[] use_properties =
+ static final String[] use_properties =
{
Context.DNS_URL,
Context.INITIAL_CONTEXT_FACTORY,
@@ -102,11 +102,11 @@ public class InitialContext implements Context
Context.STATE_FACTORIES,
Context.URL_PKG_PREFIXES,
};
-
-
+
+
/**
* Creates the new initial context with the given properties.
- *
+ *
* @param environment the properties, used by the initial context being
* created.
* @throws NamingException
@@ -115,11 +115,11 @@ public class InitialContext implements Context
{
init(environment);
}
-
+
/**
* Creates the initial context with the possibility to delay its
* initialisation.
- *
+ *
* @param lazy specified if the initialization should not be performed by this
* constructor (true). If the valueis false, it works the same way as
* the parameterless constructor.
@@ -130,18 +130,18 @@ public class InitialContext implements Context
if (! lazy)
init(null);
}
-
+
/**
* Creates teh new initial context with no properties. Same as
* InitialContext(null).
- *
+ *
* @throws NamingException
*/
public InitialContext() throws NamingException
{
init(null);
}
-
+
/**
* <p>
* Initialises the context, using the properties, specified in the passed
@@ -160,7 +160,7 @@ public class InitialContext implements Context
* specified by the system property "gnu.classpath.home.url".
* </ul>
* </p>
- *
+ *
* @param environment the table of the properties, may be null. The method
* modifies the table and stores the reference to it. The caller must
* not later reuse this structure for other purposes.
@@ -191,12 +191,12 @@ public class InitialContext implements Context
if (value != null)
pApplet.put(key, value);
}
-
+
value = System.getProperty(key);
if (value != null)
pSystem.put(key, value);
}
-
+
merge(myProps, pSystem);
if (pApplet != null)
merge(myProps, pApplet);
@@ -249,7 +249,7 @@ public class InitialContext implements Context
merge(myProps, p);
}
}
-
+
/**
* Merge the content of the two tables. If the second table contains the key
* that is missing in the first table, this key - value pair is copied to the
@@ -257,16 +257,16 @@ public class InitialContext implements Context
* {@link #colon_list} set also contains this key, the value from the second
* table is appended to the value from the first table after semicolon, and
* the resulted value replaces the value in the first table.
- *
+ *
* @param primary the first table to merge. The merged result is also stored
* in this table.
* @param additional the second table, from where additional values are taken
- */
+ */
static void merge (Hashtable<Object, Object> primary,
Hashtable<Object, Object> additional)
{
Enumeration en = additional.keys();
-
+
while (en.hasMoreElements())
{
String key2 = (String) en.nextElement();
@@ -280,13 +280,13 @@ public class InitialContext implements Context
}
}
}
-
+
/**
* Get the default initial context. If {@link #gotDefault} == false, this
* method obtains the initial context from the naming manager and sets
* gotDefault to true. Otherwise the cached value ({@link #defaultInitCtx} is
* returned.
- *
+ *
* @return the default initial context
* @throws NamingException
*/
@@ -305,7 +305,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -323,7 +323,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -348,19 +348,19 @@ public class InitialContext implements Context
return getDefaultInitCtx();
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (Name name) throws NamingException
{
try
@@ -374,7 +374,7 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (String name) throws NamingException
{
try
@@ -388,147 +388,147 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rebind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
-
+
/** @inheritDoc */
public void rebind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (Name oldName, Name newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (String oldName, String newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Name composeName (Name name, Name prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
- /** @inheritDoc */
- public String composeName (String name,
+ /** @inheritDoc */
+ public String composeName (String name,
String prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
-
+
/** @inheritDoc */
- public Object addToEnvironment (String propName,
+ public Object addToEnvironment (String propName,
Object propVal) throws NamingException
{
return myProps.put (propName, propVal);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object removeFromEnvironment (String propName) throws NamingException
{
return myProps.remove (propName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Hashtable<?,?> getEnvironment () throws NamingException
{
return myProps;
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void close () throws NamingException
{
myProps = null;
@@ -537,7 +537,7 @@ public class InitialContext implements Context
/**
* This operation is not supported for the initial naming context.
- *
+ *
* @throws OperationNotSupportedException always, unless the method is
* overridden in the derived class.
*/
diff --git a/javax/naming/InsufficientResourcesException.java b/javax/naming/InsufficientResourcesException.java
index 7a9ebe037..a7bc3a85e 100644
--- a/javax/naming/InsufficientResourcesException.java
+++ b/javax/naming/InsufficientResourcesException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class InsufficientResourcesException extends NamingException
{
private static final long serialVersionUID = 6227672693037844532L;
diff --git a/javax/naming/InterruptedNamingException.java b/javax/naming/InterruptedNamingException.java
index 90d6e5ec0..e42981a6d 100644
--- a/javax/naming/InterruptedNamingException.java
+++ b/javax/naming/InterruptedNamingException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class InterruptedNamingException extends NamingException
{
private static final long serialVersionUID = 6404516648893194728L;
diff --git a/javax/naming/InvalidNameException.java b/javax/naming/InvalidNameException.java
index 286f0455d..e76a152a8 100644
--- a/javax/naming/InvalidNameException.java
+++ b/javax/naming/InvalidNameException.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/javax/naming/LimitExceededException.java b/javax/naming/LimitExceededException.java
index 8c005ac2c..64151193f 100644
--- a/javax/naming/LimitExceededException.java
+++ b/javax/naming/LimitExceededException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class LimitExceededException extends NamingException
{
private static final long serialVersionUID = - 776898738660207856L;
diff --git a/javax/naming/LinkException.java b/javax/naming/LinkException.java
index 8f5df8b03..f5c661bbb 100644
--- a/javax/naming/LinkException.java
+++ b/javax/naming/LinkException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/javax/naming/LinkLoopException.java b/javax/naming/LinkLoopException.java
index 0c68e01bf..539294e84 100644
--- a/javax/naming/LinkLoopException.java
+++ b/javax/naming/LinkLoopException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class LinkLoopException extends LinkException
{
private static final long serialVersionUID = - 3119189944325198009L;
diff --git a/javax/naming/MalformedLinkException.java b/javax/naming/MalformedLinkException.java
index db0753ded..e665b34c3 100644
--- a/javax/naming/MalformedLinkException.java
+++ b/javax/naming/MalformedLinkException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class MalformedLinkException extends LinkException
{
private static final long serialVersionUID = - 3066740437737830242L;
diff --git a/javax/naming/Name.java b/javax/naming/Name.java
index 687ebd6fb..3b22ba5ee 100644
--- a/javax/naming/Name.java
+++ b/javax/naming/Name.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
@@ -63,7 +63,7 @@ import java.util.Enumeration;
public interface Name extends Cloneable, Serializable, Comparable<Object>
{
// This class is implemented as gnu.javax.naming.ictxImpl.trans.GnuName
-
+
long serialVersionUID = -3617482732056931635L;
/**
@@ -96,7 +96,7 @@ public interface Name extends Cloneable, Serializable, Comparable<Object>
* Returns the components till the given index as a <code>Name</code>.
* The returned <code>Name</code> can be modified without changing the
* original.
- *
+ *
* @param posn the ending position, exclusive
*
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
@@ -109,7 +109,7 @@ public interface Name extends Cloneable, Serializable, Comparable<Object>
* <code>Name</code>.
* The returned <code>Name</code> can be modified without changing the
* original.
- *
+ *
* @param posn the starting position, inclusive. If it is equal to the size
* of the name, the empty name is returned.
*
diff --git a/javax/naming/NameAlreadyBoundException.java b/javax/naming/NameAlreadyBoundException.java
index 5ddd7d8ba..07b92eee4 100644
--- a/javax/naming/NameAlreadyBoundException.java
+++ b/javax/naming/NameAlreadyBoundException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NameAlreadyBoundException extends NamingException
{
private static final long serialVersionUID = - 8491441000356780586L;
diff --git a/javax/naming/NameClassPair.java b/javax/naming/NameClassPair.java
index 7925d45d8..f4f9fda00 100644
--- a/javax/naming/NameClassPair.java
+++ b/javax/naming/NameClassPair.java
@@ -41,14 +41,14 @@ package javax.naming;
import java.io.Serializable;
/**
- * <code>NameClassPair</code> represents the name-classname mapping pair
+ * <code>NameClassPair</code> represents the name-classname mapping pair
* of a binding in a context.
* <p>
* Bindings are mappings of a name to an object and this class is used to
* specify the mapping of the name to the class type of the bound object.
* As classname the fully qualified classname is used.
* </p>
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -58,7 +58,7 @@ public class NameClassPair implements Serializable
/**
* Constructs an instance with the given name and classname.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the name of the class. If <code>null</code> the bound
@@ -70,9 +70,9 @@ public class NameClassPair implements Serializable
}
/**
- * Constructs an instance with the given name and classname and a
+ * Constructs an instance with the given name and classname and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding (may not be <code>null</code>)
* @param className the name of the class. If <code>null</code> the bound
* object is also <code>null</code>
@@ -87,7 +87,7 @@ public class NameClassPair implements Serializable
/**
* Returns the classname of the binding.
- * @return The fully qualified classname or <code>null</code> if the
+ * @return The fully qualified classname or <code>null</code> if the
* bound object is null.
*/
public String getClassName ()
@@ -106,7 +106,7 @@ public class NameClassPair implements Serializable
/**
* Checks whether the name is relative to the target context or not.
- * @return <code>true</code> if the name is relative,
+ * @return <code>true</code> if the name is relative,
* <code>false</code> otherwise.
*/
public boolean isRelative ()
@@ -140,43 +140,43 @@ public class NameClassPair implements Serializable
{
this.isRel = r;
}
-
+
/**
- * Sets the full name for this binding. Setting the full name by this
- * method is the only way to initialize full names of bindings if
+ * Sets the full name for this binding. Setting the full name by this
+ * method is the only way to initialize full names of bindings if
* supported by a specific naming system.
- *
- * @param fullName the full name of this binding. If not set or set to
+ *
+ * @param fullName the full name of this binding. If not set or set to
* <code>null</code> the <code>getNameInNamespace()</code> method will
* throw an exception
- *
+ *
* @see #getNameInNamespace()
- *
+ *
* @since 1.5
*/
- public void setNameInNamespace(String fullName)
+ public void setNameInNamespace(String fullName)
{
this.fullName = fullName;
}
-
+
/**
* Returns the full name for this binding. The full name of a binding is
- * defined as the absolute name in its own namespace and is not valid
+ * defined as the absolute name in its own namespace and is not valid
* outside.
- *
+ *
* @return The full name in the bindings namespace.
- * @throws UnsupportedOperationException if no full name is applicable in
+ * @throws UnsupportedOperationException if no full name is applicable in
* the specific naming system.
- *
+ *
* @see Context#getNameInNamespace()
- *
+ *
* @since 1.5
*/
public String getNameInNamespace()
{
if (this.fullName == null)
throw new UnsupportedOperationException();
-
+
return this.fullName;
}
diff --git a/javax/naming/NameNotFoundException.java b/javax/naming/NameNotFoundException.java
index b7c24a629..64e45f36f 100644
--- a/javax/naming/NameNotFoundException.java
+++ b/javax/naming/NameNotFoundException.java
@@ -35,10 +35,10 @@ 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 javax.naming;
-
+
public class NameNotFoundException extends NamingException
{
private static final long serialVersionUID = - 8007156725367842053L;
diff --git a/javax/naming/NameParser.java b/javax/naming/NameParser.java
index 004b40627..c83200308 100644
--- a/javax/naming/NameParser.java
+++ b/javax/naming/NameParser.java
@@ -46,10 +46,10 @@ package javax.naming;
* @see Context#getNameParser(Name)
*/
public interface NameParser
-{
+{
/**
* Parser the string name representation into the {@link Name} representation
- *
+ *
* @param name the string representation of the name
* @return the {@link Name} representation of the name.
* @throws InvalidNameException if the name violates the syntax, expected by
@@ -58,5 +58,3 @@ public interface NameParser
*/
Name parse (String name) throws NamingException;
}
-
-
diff --git a/javax/naming/NamingEnumeration.java b/javax/naming/NamingEnumeration.java
index a7c57706f..cd0963d41 100644
--- a/javax/naming/NamingEnumeration.java
+++ b/javax/naming/NamingEnumeration.java
@@ -35,7 +35,7 @@ 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 javax.naming;
import java.util.Enumeration;
@@ -58,16 +58,16 @@ public interface NamingEnumeration<T> extends Enumeration<T>
* Returns the next element in this enumeration. The naming - specific
* exceptions are only throws after returning all still available elements of
* the enumeration.
- *
+ *
* @return the next element of this enumeration
* @throws NamingException
*/
T next() throws NamingException;
-
+
/**
* Checks if there are more unvisited elements in the enumeration, throwing
* exceptions if there are some unvisited, but not available elements.
- *
+ *
* @return true if there are some unvisited elements, false otherwise.
* @throws PartialResultException if the enumeration, returned by the
* {@link Context#list(Name)} or other similar method contains only
@@ -77,13 +77,13 @@ public interface NamingEnumeration<T> extends Enumeration<T>
* @throws NamingException
*/
boolean hasMore() throws NamingException;
-
+
/**
* Immediately frees all resources, owned by this enumeration. If invoked, it
* must be the last method called for that enumeration.
- *
+ *
* @throws NamingException
- */
+ */
void close() throws NamingException;
}
diff --git a/javax/naming/NamingException.java b/javax/naming/NamingException.java
index 7a5c35eb5..28b817210 100644
--- a/javax/naming/NamingException.java
+++ b/javax/naming/NamingException.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
@@ -199,9 +199,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.addAll(name);
- }
+ {
+ remainingName.addAll(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -216,9 +216,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.add(name);
- }
+ {
+ remainingName.add(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -243,24 +243,24 @@ public class NamingException extends Exception
Throwable cause = getRootCause();
if (cause != null)
{
- sb.append(" caused by ");
- sb.append(cause);
+ sb.append(" caused by ");
+ sb.append(cause);
}
Name remaining = getRemainingName();
if (remaining != null)
{
- sb.append(" [remainingName: ");
- sb.append(remaining);
+ sb.append(" [remainingName: ");
+ sb.append(remaining);
}
Object resolved = getResolvedObj();
if (objectInfo && resolved != null)
{
- if (remainingName == null)
- sb.append(" [");
- else
- sb.append(", ");
- sb.append("resolvedObj: ");
- sb.append(resolved);
+ if (remainingName == null)
+ sb.append(" [");
+ else
+ sb.append(", ");
+ sb.append("resolvedObj: ");
+ sb.append(resolved);
}
if ((remaining != null) || (objectInfo && resolved != null))
sb.append(']');
@@ -314,4 +314,3 @@ public class NamingException extends Exception
super.printStackTrace(pw);
}
}
-
diff --git a/javax/naming/NamingSecurityException.java b/javax/naming/NamingSecurityException.java
index ae7f5edf6..34ad6dfa4 100644
--- a/javax/naming/NamingSecurityException.java
+++ b/javax/naming/NamingSecurityException.java
@@ -38,11 +38,11 @@ exception statement from your version. */
package javax.naming;
-
+
public abstract class NamingSecurityException extends NamingException
{
private static final long serialVersionUID = 5855287647294685775L;
-
+
public NamingSecurityException ()
{
super ();
diff --git a/javax/naming/NoInitialContextException.java b/javax/naming/NoInitialContextException.java
index 5e4f6df0e..a51f56766 100644
--- a/javax/naming/NoInitialContextException.java
+++ b/javax/naming/NoInitialContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoInitialContextException extends NamingException
{
private static final long serialVersionUID = - 3413733186901258623L;
diff --git a/javax/naming/NoPermissionException.java b/javax/naming/NoPermissionException.java
index 02764a991..7934e0906 100644
--- a/javax/naming/NoPermissionException.java
+++ b/javax/naming/NoPermissionException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoPermissionException extends NamingSecurityException
{
private static final long serialVersionUID = 8395332708699751775L;
diff --git a/javax/naming/NotContextException.java b/javax/naming/NotContextException.java
index a27f10f18..a543a38e3 100644
--- a/javax/naming/NotContextException.java
+++ b/javax/naming/NotContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NotContextException extends NamingException
{
private static final long serialVersionUID = 849752551644540417L;
diff --git a/javax/naming/PartialResultException.java b/javax/naming/PartialResultException.java
index 28f0467fe..dd2813b4b 100644
--- a/javax/naming/PartialResultException.java
+++ b/javax/naming/PartialResultException.java
@@ -42,7 +42,7 @@ package javax.naming;
* Thrown from the {@link javax.naming.NamingEnumeration}, this exception
* indicates that the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class PartialResultException extends NamingException
{
private static final long serialVersionUID = 2572144970049426786L;
diff --git a/javax/naming/RefAddr.java b/javax/naming/RefAddr.java
index f345c8829..6e4de1cfc 100644
--- a/javax/naming/RefAddr.java
+++ b/javax/naming/RefAddr.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
@@ -71,12 +71,12 @@ public abstract class RefAddr implements Serializable
*/
protected RefAddr(String addrType)
{
- if (addrType == null)
- throw new NullPointerException("addrType cannot be null");
-
+ if (addrType == null)
+ throw new NullPointerException("addrType cannot be null");
+
this.addrType = addrType;
}
-
+
/**
* Returns the non-null address type given to the constructor.
*/
@@ -84,13 +84,13 @@ public abstract class RefAddr implements Serializable
{
return addrType;
}
-
+
/**
* Returns the possibly null content of this RefAddr.
* The actual value is defined by the non-abstract subclass.
*/
public abstract Object getContent();
-
+
/**
* Checks if the object is a RefAddr with the same type and content.
*
@@ -107,10 +107,10 @@ public abstract class RefAddr implements Serializable
{
Object c1 = this.getContent();
Object c2 = refAddr.getContent();
- if (c1 == null)
- return c2 == null;
- else
- return c1.equals(c2);
+ if (c1 == null)
+ return c2 == null;
+ else
+ return c1.equals(c2);
}
}
return false;
diff --git a/javax/naming/Reference.java b/javax/naming/Reference.java
index fedbf589b..6a2626da0 100644
--- a/javax/naming/Reference.java
+++ b/javax/naming/Reference.java
@@ -45,37 +45,37 @@ import java.util.Vector;
/**
* This class represents a reference to an object that is located outside of the
* naming/directory system.
- *
+ *
* @see Referenceable
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class Reference implements Cloneable, Serializable
{
private static final long serialVersionUID = - 1673475790065791735L;
-
+
/**
- * The list of addresses, stored in this reference. The object may be
+ * The list of addresses, stored in this reference. The object may be
* have by several different addresses.
*/
protected Vector<RefAddr> addrs;
-
+
/**
* The name of the class factory to create an instance of the object,
* referenced by this reference.
*/
protected String classFactory;
-
+
/**
* The location, from where the class factory should be loaded.
*/
protected String classFactoryLocation;
-
+
/**
* The name of the class of the object, to that this reference refers.
*/
protected String className;
-
+
/**
* Create a new reference that is referencting to the object of the
* specified class.
@@ -85,7 +85,7 @@ public class Reference implements Cloneable, Serializable
this.className = className;
addrs = new Vector<RefAddr> ();
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class with the given address.
@@ -96,17 +96,17 @@ public class Reference implements Cloneable, Serializable
addrs = new Vector<RefAddr> ();
addrs.add (addr);
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects.
- *
+ *
* @param className the object class name
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
- public Reference (String className, String factoryClassName,
+ public Reference (String className, String factoryClassName,
String factoryLocation)
{
this.className = className;
@@ -119,14 +119,14 @@ public class Reference implements Cloneable, Serializable
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects and also the address of this object.
- *
+ *
* @param className the object class name
* @param addr the address of the object
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
public Reference (String className, RefAddr addr,
- String factoryClassName, String factoryLocation)
+ String factoryClassName, String factoryLocation)
{
this.className = className;
this.classFactory = factoryClassName;
@@ -136,14 +136,14 @@ public class Reference implements Cloneable, Serializable
}
/**
- * Add the new address for this object at the given position of the
+ * Add the new address for this object at the given position of the
* address list.
*/
public void add (int posn, RefAddr addr)
{
addrs.add (posn, addr);
}
-
+
/**
* Appends the new object address to the end of the address list.
*/
@@ -151,7 +151,7 @@ public class Reference implements Cloneable, Serializable
{
addrs.add (addr);
}
-
+
/**
* Removes all defined addresses of the object.
*/
@@ -163,7 +163,7 @@ public class Reference implements Cloneable, Serializable
public Object clone ()
{
Reference r = new Reference (className, classFactory,
- classFactoryLocation);
+ classFactoryLocation);
r.addrs = (Vector<RefAddr>) addrs.clone ();
return r;
}
@@ -173,7 +173,7 @@ public class Reference implements Cloneable, Serializable
{
return (a == null) ? (b == null) : a.equals (b);
}
-
+
/**
* Compares two addresses for equality, by value.
*/
@@ -183,11 +183,11 @@ public class Reference implements Cloneable, Serializable
return false;
Reference r = (Reference) obj;
return (equals (classFactory, r.classFactory)
- && equals (classFactoryLocation, r.classFactoryLocation)
- && equals (className, r.className)
- && addrs.equals (r.addrs));
+ && equals (classFactoryLocation, r.classFactoryLocation)
+ && equals (className, r.className)
+ && addrs.equals (r.addrs));
}
-
+
/**
* Get the address of this object at the given position.
*/
@@ -195,12 +195,12 @@ public class Reference implements Cloneable, Serializable
{
return addrs.get (posn);
}
-
+
/**
* Get the given type of address for this object.
- *
+ *
* @param addrType the needed type of address
- *
+ *
* @return the address of this object, having the specified type. If there
* is no address of such type, null is returned.
*/
@@ -208,13 +208,13 @@ public class Reference implements Cloneable, Serializable
{
for (int i = 0; i < addrs.size (); ++i)
{
- RefAddr r = addrs.get (i);
- if (addrType.equals (r.getType ()))
- return r;
+ RefAddr r = addrs.get (i);
+ if (addrType.equals (r.getType ()))
+ return r;
}
return null;
}
-
+
/**
* Get the enumeration over all defined addresses of the object.
*/
@@ -222,20 +222,20 @@ public class Reference implements Cloneable, Serializable
{
return addrs.elements ();
}
-
+
/**
* Get the name of the class of the referenced object.
- *
+ *
* @see #className
*/
public String getClassName ()
{
return className;
}
-
+
/**
* Get the location of the factory class of the referenced object.
- *
+ *
* @see #classFactoryLocation
*/
public String getFactoryClassLocation ()
@@ -245,18 +245,18 @@ public class Reference implements Cloneable, Serializable
/**
* Get the name of the factory class of the referenced object
- *
+ *
* @see #classFactory
*/
public String getFactoryClassName ()
{
return classFactory;
}
-
+
/**
- * Get the hashcode of this reference.
- *
- * @return the sum of the hash codes of the addresses.
+ * Get the hashcode of this reference.
+ *
+ * @return the sum of the hash codes of the addresses.
*/
public int hashCode ()
{
@@ -267,19 +267,19 @@ public class Reference implements Cloneable, Serializable
h += addrs.get (i).hashCode ();
return h;
}
-
+
/**
* Remove the address at the given position.
- *
+ *
* @param posn the position of the address to remove
- *
+ *
* @return the removed address
*/
public Object remove (int posn)
{
return addrs.remove (posn);
}
-
+
/**
* Return the number of the defined addresses.
*/
@@ -287,7 +287,7 @@ public class Reference implements Cloneable, Serializable
{
return addrs.size ();
}
-
+
/**
* Return the string representation.
*/
@@ -296,9 +296,9 @@ public class Reference implements Cloneable, Serializable
String x = getClass ().toString () + "[";
for (int i = 0; i < addrs.size (); ++i)
{
- if (i > 0)
- x += ",";
- x += addrs.get (i).toString ();
+ if (i > 0)
+ x += ",";
+ x += addrs.get (i).toString ();
}
return x + "]";
}
diff --git a/javax/naming/Referenceable.java b/javax/naming/Referenceable.java
index 21c5238bc..ed8e4d444 100644
--- a/javax/naming/Referenceable.java
+++ b/javax/naming/Referenceable.java
@@ -46,9 +46,9 @@ public interface Referenceable
{
/**
* Get the reference about this object.
- *
+ *
* @return the reference about this object, cannot be null.
- *
+ *
* @throws NamingException if the naming exception has been raised while
* retrieving the reference.
*/
diff --git a/javax/naming/ReferralException.java b/javax/naming/ReferralException.java
index c264d637f..b596af02e 100644
--- a/javax/naming/ReferralException.java
+++ b/javax/naming/ReferralException.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
@@ -48,7 +48,7 @@ import java.util.Hashtable;
public abstract class ReferralException extends NamingException
{
private static final long serialVersionUID = -2881363844695698876L;
-
+
protected ReferralException ()
{
super ();
diff --git a/javax/naming/ServiceUnavailableException.java b/javax/naming/ServiceUnavailableException.java
index ddb154f9e..6a07bc613 100644
--- a/javax/naming/ServiceUnavailableException.java
+++ b/javax/naming/ServiceUnavailableException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ServiceUnavailableException extends NamingException
{
private static final long serialVersionUID = - 4996964726566773444L;
diff --git a/javax/naming/SizeLimitExceededException.java b/javax/naming/SizeLimitExceededException.java
index caffa70c3..8f0523fa4 100644
--- a/javax/naming/SizeLimitExceededException.java
+++ b/javax/naming/SizeLimitExceededException.java
@@ -43,7 +43,7 @@ package javax.naming;
* indicates that there are more elements than the previously specified
* size limit. Hence the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class SizeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = 7129289564879168579L;
diff --git a/javax/naming/StringRefAddr.java b/javax/naming/StringRefAddr.java
index f40da8fd8..02f072ecf 100644
--- a/javax/naming/StringRefAddr.java
+++ b/javax/naming/StringRefAddr.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/javax/naming/TimeLimitExceededException.java b/javax/naming/TimeLimitExceededException.java
index e3456f5bb..95188d259 100644
--- a/javax/naming/TimeLimitExceededException.java
+++ b/javax/naming/TimeLimitExceededException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class TimeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = - 3597009011385034696L;
diff --git a/javax/naming/directory/AttributeInUseException.java b/javax/naming/directory/AttributeInUseException.java
index 9be25c9a9..08f337c5c 100644
--- a/javax/naming/directory/AttributeInUseException.java
+++ b/javax/naming/directory/AttributeInUseException.java
@@ -35,7 +35,7 @@ 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 javax.naming.directory;
import javax.naming.NamingException;
diff --git a/javax/naming/directory/Attributes.java b/javax/naming/directory/Attributes.java
index 2dc2c6101..50df17c2d 100644
--- a/javax/naming/directory/Attributes.java
+++ b/javax/naming/directory/Attributes.java
@@ -59,4 +59,3 @@ public interface Attributes extends Cloneable, Serializable
Attribute remove(String attrID);
Object clone();
}
-
diff --git a/javax/naming/directory/BasicAttribute.java b/javax/naming/directory/BasicAttribute.java
index 2715c9672..65b44169e 100644
--- a/javax/naming/directory/BasicAttribute.java
+++ b/javax/naming/directory/BasicAttribute.java
@@ -56,7 +56,7 @@ import javax.naming.OperationNotSupportedException;
public class BasicAttribute implements Attribute
{
private static final long serialVersionUID = 6743528196119291326L;
-
+
/** The ID of this attribute. */
protected String attrID;
/** True if this attribute's values are ordered. */
@@ -126,8 +126,8 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- return true;
+ if (equals (val, values.get (i)))
+ return true;
}
return false;
@@ -140,29 +140,29 @@ public class BasicAttribute implements Attribute
BasicAttribute b = (BasicAttribute) obj;
if (ordered != b.ordered
- || ! attrID.equals (b.attrID)
- || values.size () != b.values.size ())
+ || ! attrID.equals (b.attrID)
+ || values.size () != b.values.size ())
return false;
for (int i = 0; i < values.size (); ++i)
{
- boolean ok = false;
- if (ordered)
- ok = equals (values.get (i), b.values.get (i));
- else
- {
- for (int j = 0; j < b.values.size (); ++j)
- {
- if (equals (values.get (i), b.values.get (j)))
- {
- ok = true;
- break;
- }
- }
- }
-
- if (! ok)
- return false;
+ boolean ok = false;
+ if (ordered)
+ ok = equals (values.get (i), b.values.get (i));
+ else
+ {
+ for (int j = 0; j < b.values.size (); ++j)
+ {
+ if (equals (values.get (i), b.values.get (j)))
+ {
+ ok = true;
+ break;
+ }
+ }
+ }
+
+ if (! ok)
+ return false;
}
return true;
@@ -210,19 +210,19 @@ public class BasicAttribute implements Attribute
int val = attrID.hashCode ();
for (int i = 0; i < values.size (); ++i)
{
- Object o = values.get (i);
- if (o == null)
- {
- // Nothing.
- }
- else if (o instanceof Object[])
- {
- Object[] a = (Object[]) o;
- for (int j = 0; j < a.length; ++j)
- val += a[j].hashCode ();
- }
- else
- val += o.hashCode ();
+ Object o = values.get (i);
+ if (o == null)
+ {
+ // Nothing.
+ }
+ else if (o instanceof Object[])
+ {
+ Object[] a = (Object[]) o;
+ for (int j = 0; j < a.length; ++j)
+ val += a[j].hashCode ();
+ }
+ else
+ val += o.hashCode ();
}
return val;
@@ -242,11 +242,11 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- {
- values.remove (i);
- return true;
- }
+ if (equals (val, values.get (i)))
+ {
+ values.remove (i);
+ return true;
+ }
}
return false;
@@ -281,27 +281,27 @@ public class BasicAttribute implements Attribute
if (one instanceof Object[])
{
- if (! (two instanceof Object[]))
- return false;
+ if (! (two instanceof Object[]))
+ return false;
- Object[] aone = (Object[]) one;
- Object[] atwo = (Object[]) two;
+ Object[] aone = (Object[]) one;
+ Object[] atwo = (Object[]) two;
- if (aone.length != atwo.length)
- return false;
+ if (aone.length != atwo.length)
+ return false;
- for (int i = 0; i < aone.length; ++i)
- {
- if (! aone[i].equals (atwo[i]))
- return false;
- }
+ for (int i = 0; i < aone.length; ++i)
+ {
+ if (! aone[i].equals (atwo[i]))
+ return false;
+ }
- return true;
+ return true;
}
return one.equals (two);
}
-
+
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
@@ -317,9 +317,9 @@ public class BasicAttribute implements Attribute
s.defaultWriteObject();
s.writeInt(values.size());
for (int i=0; i < values.size(); i++)
- s.writeObject(values.get(i));
+ s.writeObject(values.get(i));
}
-
+
// Used when enumerating this attribute.
private class BasicAttributeEnumeration implements NamingEnumeration
{
@@ -351,7 +351,7 @@ public class BasicAttribute implements Attribute
public Object nextElement () throws NoSuchElementException
{
if (where == values.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
return values.get (where++);
}
}
diff --git a/javax/naming/directory/BasicAttributes.java b/javax/naming/directory/BasicAttributes.java
index 54b1f197b..8b607a8cc 100644
--- a/javax/naming/directory/BasicAttributes.java
+++ b/javax/naming/directory/BasicAttributes.java
@@ -54,7 +54,7 @@ import javax.naming.NamingException;
public class BasicAttributes implements Attributes
{
private static final long serialVersionUID = 4980164073184639448L;
-
+
public BasicAttributes ()
{
this (false);
@@ -98,16 +98,16 @@ public class BasicAttributes implements Attributes
Attributes bs = (Attributes) obj;
if (ignoreCase != bs.isCaseIgnored()
- || attributes.size () != bs.size ())
+ || attributes.size () != bs.size ())
return false;
NamingEnumeration bas = bs.getAll();
while (bas.hasMoreElements())
{
- Attribute a = (Attribute) bas.nextElement();
- Attribute b = get(a.getID ());
- if (! a.equals(b))
- return false;
+ Attribute a = (Attribute) bas.nextElement();
+ Attribute b = get(a.getID ());
+ if (! a.equals(b))
+ return false;
}
return true;
@@ -117,10 +117,10 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- return at;
+ Attribute at = attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ return at;
}
return null;
@@ -139,7 +139,7 @@ public class BasicAttributes implements Attributes
{
return attrs.hasMore();
}
-
+
public boolean hasMoreElements()
{
return attrs.hasMoreElements();
@@ -191,13 +191,13 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = (Attribute) attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- {
- attributes.remove (i);
- return at;
- }
+ Attribute at = (Attribute) attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ {
+ attributes.remove (i);
+ return at;
+ }
}
return null;
@@ -213,9 +213,9 @@ public class BasicAttributes implements Attributes
String r = "";
for (int i = 0; i < attributes.size (); ++i)
{
- if (i > 0)
- r += "; ";
- r += attributes.get (i).toString ();
+ if (i > 0)
+ r += "; ";
+ r += attributes.get (i).toString ();
}
return r;
}
@@ -230,7 +230,7 @@ public class BasicAttributes implements Attributes
{
s.defaultReadObject();
int size = s.readInt();
- attributes = new Vector<Attribute>(size);
+ attributes = new Vector<Attribute>(size);
for (int i = 0; i < size; i++)
attributes.add((Attribute) s.readObject());
}
@@ -275,7 +275,7 @@ public class BasicAttributes implements Attributes
public Attribute nextElement () throws NoSuchElementException
{
if (where >= attributes.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
Attribute at = attributes.get (where);
++where;
return at;
diff --git a/javax/naming/directory/InitialDirContext.java b/javax/naming/directory/InitialDirContext.java
index 8c7852fbb..68130b28c 100644
--- a/javax/naming/directory/InitialDirContext.java
+++ b/javax/naming/directory/InitialDirContext.java
@@ -211,7 +211,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration<SearchResult> search(String name,
@@ -220,7 +220,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration<SearchResult> search(Name name,
@@ -257,7 +257,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
public NamingEnumeration<SearchResult> search(String name,
@@ -267,6 +267,6 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
}
diff --git a/javax/naming/directory/ModificationItem.java b/javax/naming/directory/ModificationItem.java
index 56a5ae609..b7cb48e68 100644
--- a/javax/naming/directory/ModificationItem.java
+++ b/javax/naming/directory/ModificationItem.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -57,8 +57,8 @@ public class ModificationItem implements Serializable
if (attr == null)
throw new IllegalArgumentException("attr is null");
if (mod_op != DirContext.ADD_ATTRIBUTE &&
- mod_op != DirContext.REPLACE_ATTRIBUTE &&
- mod_op != DirContext.REMOVE_ATTRIBUTE)
+ mod_op != DirContext.REPLACE_ATTRIBUTE &&
+ mod_op != DirContext.REMOVE_ATTRIBUTE)
throw new IllegalArgumentException("mod_op is invalid");
this.mod_op = mod_op;
this.attr = attr;
diff --git a/javax/naming/directory/SearchControls.java b/javax/naming/directory/SearchControls.java
index 5ba488bf7..805e97170 100644
--- a/javax/naming/directory/SearchControls.java
+++ b/javax/naming/directory/SearchControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -66,7 +66,7 @@ public class SearchControls implements Serializable
}
public SearchControls(int scope, long countlim, int timelim, String[] attrs,
- boolean retobj, boolean deref)
+ boolean retobj, boolean deref)
{
searchScope = scope;
timeLimit = timelim;
diff --git a/javax/naming/directory/SearchResult.java b/javax/naming/directory/SearchResult.java
index ce6bfed6e..5d6a2b1f8 100644
--- a/javax/naming/directory/SearchResult.java
+++ b/javax/naming/directory/SearchResult.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -58,21 +58,21 @@ public class SearchResult extends Binding
}
public SearchResult(String name, Object obj, Attributes attrs,
- boolean isRelative)
+ boolean isRelative)
{
super(name, obj, isRelative);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs)
+ Attributes attrs)
{
super(name, className, obj);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs, boolean isRelative)
+ Attributes attrs, boolean isRelative)
{
super(name, className, obj, isRelative);
this.attrs = attrs;
diff --git a/javax/naming/event/EventContext.java b/javax/naming/event/EventContext.java
index 32629c04c..fbee9718d 100644
--- a/javax/naming/event/EventContext.java
+++ b/javax/naming/event/EventContext.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -55,11 +55,11 @@ public interface EventContext extends Context
void addNamingListener (Name target, int scope, NamingListener l)
throws NamingException;
-
+
void addNamingListener (String target, int scope, NamingListener l)
throws NamingException;
-
+
void removeNamingListener (NamingListener l) throws NamingException;
-
+
boolean targetMustExist() throws NamingException;
}
diff --git a/javax/naming/event/NamespaceChangeListener.java b/javax/naming/event/NamespaceChangeListener.java
index 464b7187a..efe797e7a 100644
--- a/javax/naming/event/NamespaceChangeListener.java
+++ b/javax/naming/event/NamespaceChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/event/NamingEvent.java b/javax/naming/event/NamingEvent.java
index 1bf381a44..dcc8c89b1 100644
--- a/javax/naming/event/NamingEvent.java
+++ b/javax/naming/event/NamingEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -62,7 +62,7 @@ public class NamingEvent extends EventObject
protected Binding newBinding;
public NamingEvent(EventContext source, int type, Binding newBd,
- Binding oldBd, Object changeInfo)
+ Binding oldBd, Object changeInfo)
{
super(source);
this.type = type;
@@ -106,17 +106,17 @@ public class NamingEvent extends EventObject
switch (type)
{
case OBJECT_ADDED:
- ((NamespaceChangeListener) listener).objectAdded(this);
- break;
+ ((NamespaceChangeListener) listener).objectAdded(this);
+ break;
case OBJECT_REMOVED:
- ((NamespaceChangeListener) listener).objectRemoved(this);
- break;
+ ((NamespaceChangeListener) listener).objectRemoved(this);
+ break;
case OBJECT_RENAMED:
- ((NamespaceChangeListener) listener).objectRenamed(this);
- break;
+ ((NamespaceChangeListener) listener).objectRenamed(this);
+ break;
case OBJECT_CHANGED:
- ((ObjectChangeListener) listener).objectChanged(this);
- break;
+ ((ObjectChangeListener) listener).objectChanged(this);
+ break;
}
}
}
diff --git a/javax/naming/event/NamingExceptionEvent.java b/javax/naming/event/NamingExceptionEvent.java
index 3a9de21f5..27a7552d8 100644
--- a/javax/naming/event/NamingExceptionEvent.java
+++ b/javax/naming/event/NamingExceptionEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
diff --git a/javax/naming/event/NamingListener.java b/javax/naming/event/NamingListener.java
index 4f313a35c..e820d55c3 100644
--- a/javax/naming/event/NamingListener.java
+++ b/javax/naming/event/NamingListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.event;
import java.util.EventListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/event/ObjectChangeListener.java b/javax/naming/event/ObjectChangeListener.java
index 00e8c4cb0..63ccc5bab 100644
--- a/javax/naming/event/ObjectChangeListener.java
+++ b/javax/naming/event/ObjectChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/Control.java b/javax/naming/ldap/Control.java
index 9f6409b53..b852c0063 100644
--- a/javax/naming/ldap/Control.java
+++ b/javax/naming/ldap/Control.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/ControlFactory.java b/javax/naming/ldap/ControlFactory.java
index b8151640f..05d53f9a8 100644
--- a/javax/naming/ldap/ControlFactory.java
+++ b/javax/naming/ldap/ControlFactory.java
@@ -58,8 +58,8 @@ public abstract class ControlFactory
throws NamingException;
public static Control getControlInstance (Control control,
- Context ctx,
- Hashtable<?, ?> env)
+ Context ctx,
+ Hashtable<?, ?> env)
throws NamingException
{
String path = (String) env.get (LdapContext.CONTROL_FACTORIES);
@@ -74,32 +74,32 @@ public abstract class ControlFactory
StringTokenizer tokens = new StringTokenizer (path, ":");
while (tokens.hasMoreTokens ())
{
- String name = tokens.nextToken ();
- try
- {
- Class k = Class.forName (name);
- ControlFactory cf = (ControlFactory) k.newInstance ();
- Control ctrl = cf.getControlInstance (control);
- if (ctrl != null)
- return ctrl;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // Ignore it.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String name = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (name);
+ ControlFactory cf = (ControlFactory) k.newInstance ();
+ Control ctrl = cf.getControlInstance (control);
+ if (ctrl != null)
+ return ctrl;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // Ignore it.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return control;
diff --git a/javax/naming/ldap/ExtendedRequest.java b/javax/naming/ldap/ExtendedRequest.java
index e6379c0c0..43ddcd7d0 100644
--- a/javax/naming/ldap/ExtendedRequest.java
+++ b/javax/naming/ldap/ExtendedRequest.java
@@ -41,7 +41,7 @@ package javax.naming.ldap;
import java.io.Serializable;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,7 +51,7 @@ public interface ExtendedRequest extends Serializable
String getID();
byte[] getEncodedValue();
ExtendedResponse createExtendedResponse(String id,
- byte[] berValue, int offset,
- int length)
- throws NamingException;
+ byte[] berValue, int offset,
+ int length)
+ throws NamingException;
}
diff --git a/javax/naming/ldap/ExtendedResponse.java b/javax/naming/ldap/ExtendedResponse.java
index a3b6dd12c..18b222161 100644
--- a/javax/naming/ldap/ExtendedResponse.java
+++ b/javax/naming/ldap/ExtendedResponse.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/HasControls.java b/javax/naming/ldap/HasControls.java
index a1698963f..f3b97fca4 100644
--- a/javax/naming/ldap/HasControls.java
+++ b/javax/naming/ldap/HasControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/InitialLdapContext.java b/javax/naming/ldap/InitialLdapContext.java
index 1a29c6ae8..011ff5ab5 100644
--- a/javax/naming/ldap/InitialLdapContext.java
+++ b/javax/naming/ldap/InitialLdapContext.java
@@ -69,12 +69,12 @@ public class InitialLdapContext
Hashtable<Object, Object> myenv = null;
if (connControls != null)
{
- if (environment == null)
- myenv = new Hashtable<Object, Object> ();
- else
- myenv = (Hashtable<Object, Object>) environment.clone ();
- myenv.put ("java.naming.ldap.control.connect",
- connControls);
+ if (environment == null)
+ myenv = new Hashtable<Object, Object> ();
+ else
+ myenv = (Hashtable<Object, Object>) environment.clone ();
+ myenv.put ("java.naming.ldap.control.connect",
+ connControls);
}
init (myenv);
diff --git a/javax/naming/ldap/LdapContext.java b/javax/naming/ldap/LdapContext.java
index 10b72f77f..ff11259be 100644
--- a/javax/naming/ldap/LdapContext.java
+++ b/javax/naming/ldap/LdapContext.java
@@ -40,7 +40,7 @@ package javax.naming.ldap;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/LdapReferralException.java b/javax/naming/ldap/LdapReferralException.java
index 87942b9fc..faa719c36 100644
--- a/javax/naming/ldap/LdapReferralException.java
+++ b/javax/naming/ldap/LdapReferralException.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.ReferralException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/StartTlsRequest.java b/javax/naming/ldap/StartTlsRequest.java
index b0a30b54f..42ee8d774 100644
--- a/javax/naming/ldap/StartTlsRequest.java
+++ b/javax/naming/ldap/StartTlsRequest.java
@@ -55,7 +55,7 @@ public class StartTlsRequest
/**
* The assigned object identifier for this response.
*/
- public static final String OID = "1.3.6.1.4.1.1466.20037";
+ public static final String OID = "1.3.6.1.4.1.1466.20037";
/**
* Create a new instance.
diff --git a/javax/naming/ldap/UnsolicitedNotification.java b/javax/naming/ldap/UnsolicitedNotification.java
index 0b6f9d779..ca911f541 100644
--- a/javax/naming/ldap/UnsolicitedNotification.java
+++ b/javax/naming/ldap/UnsolicitedNotification.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/UnsolicitedNotificationEvent.java b/javax/naming/ldap/UnsolicitedNotificationEvent.java
index f9946064a..52e591a61 100644
--- a/javax/naming/ldap/UnsolicitedNotificationEvent.java
+++ b/javax/naming/ldap/UnsolicitedNotificationEvent.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.util.EventObject;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -47,12 +47,12 @@ import java.util.EventObject;
public class UnsolicitedNotificationEvent extends EventObject
{
private static final long serialVersionUID = -2382603380799883705L;
-
+
// Serialized fields.
private UnsolicitedNotification notice;
public UnsolicitedNotificationEvent(Object src,
- UnsolicitedNotification notice)
+ UnsolicitedNotification notice)
{
super(src);
this.notice = notice;
diff --git a/javax/naming/ldap/UnsolicitedNotificationListener.java b/javax/naming/ldap/UnsolicitedNotificationListener.java
index fd56f0598..f2a35da6c 100644
--- a/javax/naming/ldap/UnsolicitedNotificationListener.java
+++ b/javax/naming/ldap/UnsolicitedNotificationListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.event.NamingListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/spi/DirObjectFactory.java b/javax/naming/spi/DirObjectFactory.java
index 1a71c28f7..47fb7a1e7 100644
--- a/javax/naming/spi/DirObjectFactory.java
+++ b/javax/naming/spi/DirObjectFactory.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,6 +51,6 @@ import javax.naming.directory.Attributes;
public interface DirObjectFactory extends ObjectFactory
{
Object getObjectInstance(Object obj, Name name, Context nameCtx,
- Hashtable<?, ?> environment, Attributes attrs)
- throws Exception;
+ Hashtable<?, ?> environment, Attributes attrs)
+ throws Exception;
}
diff --git a/javax/naming/spi/DirStateFactory.java b/javax/naming/spi/DirStateFactory.java
index 6ddd12f36..1c0c21b13 100644
--- a/javax/naming/spi/DirStateFactory.java
+++ b/javax/naming/spi/DirStateFactory.java
@@ -44,7 +44,7 @@ import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -76,8 +76,8 @@ public interface DirStateFactory extends StateFactory
}
DirStateFactory.Result getStateToBind(Object obj, Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes inAttrs)
- throws NamingException;
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes inAttrs)
+ throws NamingException;
}
diff --git a/javax/naming/spi/DirectoryManager.java b/javax/naming/spi/DirectoryManager.java
index a6d91b20c..4abb5f1a6 100644
--- a/javax/naming/spi/DirectoryManager.java
+++ b/javax/naming/spi/DirectoryManager.java
@@ -73,28 +73,28 @@ public class DirectoryManager extends NamingManager
// Try to create an object using the factory. Return null on
// failure.
private static Object tryCreateObject (ObjectFactory factory,
- Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable environment,
- Attributes attrs)
+ Object refInfo,
+ Name name,
+ Context nameCtx,
+ Hashtable environment,
+ Attributes attrs)
throws Exception
{
if (factory instanceof DirObjectFactory)
{
- DirObjectFactory dof = (DirObjectFactory) factory;
- return dof.getObjectInstance (refInfo, name, nameCtx,
- environment, attrs);
+ DirObjectFactory dof = (DirObjectFactory) factory;
+ return dof.getObjectInstance (refInfo, name, nameCtx,
+ environment, attrs);
}
else
return factory.getObjectInstance (refInfo, name, nameCtx,
- environment);
+ environment);
}
public static Object getObjectInstance (Object refInfo, Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes attrs)
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes attrs)
throws Exception
{
ObjectFactory factory = null;
@@ -103,139 +103,139 @@ public class DirectoryManager extends NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass);
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = tryCreateObject (factory,
- refInfo,
- name,
- nameCtx,
- environment,
- attrs);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName);
- factory = (ObjectFactory) k.newInstance ();
- Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass);
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = tryCreateObject (factory,
+ refInfo,
+ name,
+ nameCtx,
+ environment,
+ attrs);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName);
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = tryCreateObject (factory, refInfo, name,
+ nameCtx, environment, attrs);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
+ nameCtx, environment, attrs);
return obj == null ? refInfo : obj;
}
public static DirStateFactory.Result getStateToBind (Object obj,
- Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes attrs)
+ Name name,
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes attrs)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName);
- StateFactory factory = (StateFactory) k.newInstance ();
-
- DirStateFactory.Result result = null;
- if (factory instanceof DirStateFactory)
- {
- DirStateFactory dsf = (DirStateFactory) factory;
- result = dsf.getStateToBind (obj, name, nameCtx, environment,
- attrs);
- }
- else
- {
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- result = new DirStateFactory.Result (o, attrs);
- }
- if (result != null)
- return result;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName);
+ StateFactory factory = (StateFactory) k.newInstance ();
+
+ DirStateFactory.Result result = null;
+ if (factory instanceof DirStateFactory)
+ {
+ DirStateFactory dsf = (DirStateFactory) factory;
+ result = dsf.getStateToBind (obj, name, nameCtx, environment,
+ attrs);
+ }
+ else
+ {
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ result = new DirStateFactory.Result (o, attrs);
+ }
+ if (result != null)
+ return result;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return new DirStateFactory.Result (obj, attrs);
diff --git a/javax/naming/spi/InitialContextFactory.java b/javax/naming/spi/InitialContextFactory.java
index f715327ef..bd13c6e38 100644
--- a/javax/naming/spi/InitialContextFactory.java
+++ b/javax/naming/spi/InitialContextFactory.java
@@ -58,7 +58,7 @@ public interface InitialContextFactory
{
/**
* Create a new initial context
- *
+ *
* @param environment the properties, used when creating the context. The
* implementing class will not modify the table nor keep the
* reference to it. After the method returns, the caller can safely
diff --git a/javax/naming/spi/InitialContextFactoryBuilder.java b/javax/naming/spi/InitialContextFactoryBuilder.java
index 31bafe6dc..12ee888ba 100644
--- a/javax/naming/spi/InitialContextFactoryBuilder.java
+++ b/javax/naming/spi/InitialContextFactoryBuilder.java
@@ -47,14 +47,14 @@ import javax.naming.NamingException;
* initial naming contexts. JNDI allows to specifiy different initial contexts
* at runtime. The user program can install its own initial context factory
* builder.
- *
+ *
* @see NamingManager#setInitialContextFactoryBuilder
*/
public interface InitialContextFactoryBuilder
{
/**
* Create the new initial context factory
- *
+ *
* @param environment the properties, used for creation of the initial
* context factory. The parameter is owned by the caller: it is safe to reuse
* the table for other purposes after the method returns.
diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java
index cc8d46fa4..d974513b3 100644
--- a/javax/naming/spi/NamingManager.java
+++ b/javax/naming/spi/NamingManager.java
@@ -84,16 +84,16 @@ public class NamingManager
/**
* Checks if the initial context factory builder has been set.
- *
+ *
* @return true if the builder has been set
- *
+ *
* @see #setInitialContextFactoryBuilder(InitialContextFactoryBuilder)
*/
public static boolean hasInitialContextFactoryBuilder ()
{
return icfb != null;
}
-
+
/**
* Creates the initial context. If the initial object factory builder has
* been set with {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)},
@@ -101,54 +101,54 @@ public class NamingManager
* for the property Context.INITIAL_CONTEXT_FACTORY first in the passed
* table and then in the system properties. The value of this property is
* uses as a class name to install the context factory. The corresponding
- * class must exist, be public and have the public parameterless constructor.
- *
+ * class must exist, be public and have the public parameterless constructor.
+ *
* @param environment the properties, used to create the context.
- *
+ *
* @return the created context
- *
+ *
* @throws NoInitialContextException if the initial builder is not set,
* the property Context.INITIAL_CONTEXT_FACTORY is missing of the
- * class, named by this property, cannot be instantiated.
+ * class, named by this property, cannot be instantiated.
* @throws NamingException if throws by the context factory
*/
public static Context getInitialContext (Hashtable<?, ?> environment)
throws NamingException
{
InitialContextFactory icf = null;
-
+
if (icfb != null)
icf = icfb.createInitialContextFactory(environment);
else
- {
- String java_naming_factory_initial = null;
- if (environment != null)
- java_naming_factory_initial
- = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- java_naming_factory_initial =
- System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- throw new
- NoInitialContextException ("Can't find property: "
- + Context.INITIAL_CONTEXT_FACTORY);
-
- try
- {
- icf = (InitialContextFactory)Class.forName
- (java_naming_factory_initial, true,
- Thread.currentThread().getContextClassLoader())
- .newInstance ();
- }
- catch (Exception exception)
- {
- NoInitialContextException e
- = new NoInitialContextException
- ("Can't load InitialContextFactory class: "
- + java_naming_factory_initial);
- e.setRootCause(exception);
- throw e;
- }
+ {
+ String java_naming_factory_initial = null;
+ if (environment != null)
+ java_naming_factory_initial
+ = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ java_naming_factory_initial =
+ System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ throw new
+ NoInitialContextException ("Can't find property: "
+ + Context.INITIAL_CONTEXT_FACTORY);
+
+ try
+ {
+ icf = (InitialContextFactory)Class.forName
+ (java_naming_factory_initial, true,
+ Thread.currentThread().getContextClassLoader())
+ .newInstance ();
+ }
+ catch (Exception exception)
+ {
+ NoInitialContextException e
+ = new NoInitialContextException
+ ("Can't load InitialContextFactory class: "
+ + java_naming_factory_initial);
+ e.setRootCause(exception);
+ throw e;
+ }
}
return icf.getInitialContext (environment);
@@ -178,7 +178,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param refInfo passed to the factory
* @param name passed to the factory
* @param nameCtx passed to the factory
@@ -198,7 +198,7 @@ public class NamingManager
// The final default location, as specified in the documentation.
String finalPrefix = "com.sun.jndi.url";
-
+
CPStringBuilder allPrefixes = new CPStringBuilder();
String prefixes;
@@ -208,7 +208,7 @@ public class NamingManager
if (prefixes != null)
allPrefixes.append(prefixes);
}
-
+
prefixes = System.getProperty(Context.URL_PKG_PREFIXES);
if (prefixes != null)
{
@@ -224,7 +224,7 @@ public class NamingManager
allPrefixes.append(finalPrefix);
scheme = scheme + "." + scheme + "URLContextFactory";
-
+
StringTokenizer tokens = new StringTokenizer(allPrefixes.toString(), ":");
while (tokens.hasMoreTokens())
{
@@ -279,8 +279,8 @@ public class NamingManager
{
// Anything from getObjectInstance.
}
- }
-
+ }
+
return null;
}
@@ -322,9 +322,9 @@ public class NamingManager
}
}
return null;
- }
-
-
+ }
+
+
/**
* <p>
* Creates the URL context for the given URL scheme id.
@@ -345,7 +345,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param scheme the url scheme that must be supported by the given context
* @param environment the properties for creating the factory and context
* (may be null)
@@ -354,7 +354,7 @@ public class NamingManager
* context.
*/
public static Context getURLContext (String scheme,
- Hashtable<?, ?> environment)
+ Hashtable<?, ?> environment)
throws NamingException
{
return getURLContext (null, null, null, scheme, environment);
@@ -362,12 +362,12 @@ public class NamingManager
/**
* Sets the initial object factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
*/
@@ -385,7 +385,7 @@ public class NamingManager
}
static StringTokenizer getPlusPath (String property, Hashtable env,
- Context nameCtx)
+ Context nameCtx)
throws NamingException
{
String path = (String) env.get (property);
@@ -398,12 +398,12 @@ public class NamingManager
path += ":" + path2;
return new StringTokenizer (path != null ? path : "", ":");
}
-
+
/**
* <p>Creates an object for the specified name context, environment and
* referencing context object.</p>
* <p>
- * If the builder factory is set by
+ * If the builder factory is set by
* {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)}, the call is
* delegated to that factory. Otherwise, the object is created using the
* following rules:
@@ -415,20 +415,20 @@ public class NamingManager
* are StringRefAddrs having the address type "URL", the object is
* created by the URL context factory. The used factory corresponds the
* the naming schema of the each URL. If the attempt to create
- * the object this way is not successful, the subsequent rule is
+ * the object this way is not successful, the subsequent rule is
* tried.</li>
* <li> If the refInfo is not an instance of Reference or Referencable
* (for example, null), the object is created by the factories,
- * specified in the Context.OBJECT_FACTORIES property of the
+ * specified in the Context.OBJECT_FACTORIES property of the
* environment and the provider resource file, associated with the
* nameCtx. The value of this property is the colon separated list
* of the possible factories. If none of the factories can be
- * loaded, the refInfo is returned.
+ * loaded, the refInfo is returned.
* </ul>
* </p>
* <p>The object factory must be public and have the public parameterless
* constructor.</p>
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -441,19 +441,19 @@ public class NamingManager
* @param environment contains additional information for creating the object.
* This paramter can be null if there is no need to provide any
* additional information.
- *
+ *
* @return the created object. If the creation fails, in some cases
* the parameter refInfo may be returned.
- *
+ *
* @throws NamingException if the attempt to name the new object has failed
* @throws Exception if the object factory throws it. The object factory
* only throws an exception if it does not want other factories
* to be used to create the object.
*/
public static Object getObjectInstance (Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable<?, ?> environment)
+ Name name,
+ Context nameCtx,
+ Hashtable<?, ?> environment)
throws Exception
{
ObjectFactory factory = null;
@@ -462,102 +462,102 @@ public class NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = factory.getObjectInstance (refInfo,
- name,
- nameCtx,
- environment);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = factory.getObjectInstance (refInfo,
+ name,
+ nameCtx,
+ environment);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = factory.getObjectInstance (refInfo, name,
+ nameCtx, environment);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
+ nameCtx, environment);
return obj == null ? refInfo : obj;
}
/**
* Sets the initial context factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
- *
+ *
* @see #hasInitialContextFactoryBuilder()
*/
- public static void setInitialContextFactoryBuilder
+ public static void setInitialContextFactoryBuilder
(InitialContextFactoryBuilder builder)
throws NamingException
{
@@ -570,17 +570,17 @@ public class NamingManager
if (builder != null)
icfb = builder;
}
-
+
/**
* Creates a context in which the context operation must be continued.
* This method is used by operations on names that span multiple namespaces.
- *
+ *
* @param cpe the exception that triggered this continuation. This method
* obtains the environment ({@link CannotProceedException#getEnvironment()}
* and sets the environment property {@link #CPE} = cpe.
- *
+ *
* @return a non null context for continuing the operation
- *
+ *
* @throws NamingException if the naming problems have occured
*/
public static Context getContinuationContext (CannotProceedException cpe)
@@ -593,12 +593,12 @@ public class NamingManager
// TODO: Check if this implementation matches the API specification
try
{
- Object obj = getObjectInstance (cpe.getResolvedObj(),
- cpe.getAltName (),
- cpe.getAltNameCtx (),
- env);
- if (obj != null)
- return (Context) obj;
+ Object obj = getObjectInstance (cpe.getResolvedObj(),
+ cpe.getAltName (),
+ cpe.getAltNameCtx (),
+ env);
+ if (obj != null)
+ return (Context) obj;
}
catch (Exception _)
{
@@ -609,10 +609,10 @@ public class NamingManager
throw cpe;
}
-
+
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -624,46 +624,46 @@ public class NamingManager
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- */
+ */
public static Object getStateToBind (Object obj, Name name,
- Context nameCtx, Hashtable<?, ?> environment)
+ Context nameCtx, Hashtable<?, ?> environment)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- StateFactory factory = (StateFactory) k.newInstance ();
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- return o;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ StateFactory factory = (StateFactory) k.newInstance ();
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ return o;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return obj;
diff --git a/javax/naming/spi/ObjectFactory.java b/javax/naming/spi/ObjectFactory.java
index 4534481a7..d44d2ff65 100644
--- a/javax/naming/spi/ObjectFactory.java
+++ b/javax/naming/spi/ObjectFactory.java
@@ -54,7 +54,7 @@ public interface ObjectFactory
/**
* Creates the object, using the specified name and location information. The
* call of this method must be thread safe.
- *
+ *
* @param refObj may provide the reference and location information. Can be null.
* @param name the name of the new object in the scope of the specified naming
* context. Can be null if the name is not specified.
@@ -67,8 +67,8 @@ public interface ObjectFactory
* @return the newly created object or null if the object cannot be created
* @throws Exception if this factory suggest not to try creating of this
* object by other alternative factories
- *
- * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
+ *
+ * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
*/
Object getObjectInstance (Object refObj, Name name, Context nameCtx,
Hashtable<?, ?> environment)
diff --git a/javax/naming/spi/ObjectFactoryBuilder.java b/javax/naming/spi/ObjectFactoryBuilder.java
index 6a528b17a..e0886d144 100644
--- a/javax/naming/spi/ObjectFactoryBuilder.java
+++ b/javax/naming/spi/ObjectFactoryBuilder.java
@@ -43,19 +43,19 @@ import java.util.Hashtable;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.Referenceable;
-
+
/**
* Represents the builder that creates the object factories.
- *
+ *
* @see NamingManager#setObjectFactoryBuilder(ObjectFactoryBuilder)
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface ObjectFactoryBuilder
{
/**
* Create a new object using the supplied environment.
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -65,6 +65,6 @@ public interface ObjectFactoryBuilder
* @throws NamingException
*/
ObjectFactory createObjectFactory(Object refInfo,
- Hashtable<?, ?> environment)
- throws NamingException;
+ Hashtable<?, ?> environment)
+ throws NamingException;
}
diff --git a/javax/naming/spi/ResolveResult.java b/javax/naming/spi/ResolveResult.java
index d5051a5d4..3945b9b43 100644
--- a/javax/naming/spi/ResolveResult.java
+++ b/javax/naming/spi/ResolveResult.java
@@ -43,12 +43,12 @@ import java.io.Serializable;
import javax.naming.CompositeName;
import javax.naming.InvalidNameException;
import javax.naming.Name;
-
+
/**
* Stores the partial resolution of the name. This class contains the
* object to which part of the name has been resolved and the remaining,
- * unresolved part of this name.
- *
+ * unresolved part of this name.
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
@@ -61,22 +61,22 @@ public class ResolveResult implements Serializable
* The object, to that part of the name has been resolved.
*/
protected Object resolvedObj;
-
+
/**
* The remaining, unresolved part of the name.
*/
protected Name remainingName;
-
+
/**
* Create the unitialised instance with both parts being null.
*/
protected ResolveResult()
{
}
-
+
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -88,7 +88,7 @@ public class ResolveResult implements Serializable
remainingName = new CompositeName ();
try
{
- remainingName.add (remaining);
+ remainingName.add (remaining);
}
catch (InvalidNameException _)
{
@@ -97,7 +97,7 @@ public class ResolveResult implements Serializable
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -109,7 +109,7 @@ public class ResolveResult implements Serializable
/**
* Get the remaining unresolved part of the name
- *
+ *
* @return the remaining unresolved part of the name.
*/
public Name getRemainingName()
@@ -119,17 +119,17 @@ public class ResolveResult implements Serializable
/**
* Get the object to that the name was partially resolved
- *
+ *
* @return the object, to that the name is partially resolved
*/
public Object getResolvedObj()
{
return resolvedObj;
}
-
+
/**
* Set the remaining unresolved name.
- *
+ *
* @param name the name being set. The passed parameter is cloned, so the
* caller can reuse or modify it after the method returns.
*/
@@ -137,17 +137,17 @@ public class ResolveResult implements Serializable
{
remainingName = (Name) name.clone();
}
-
+
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingName(Name name)
{
try
{
- remainingName.addAll(name);
+ remainingName.addAll(name);
}
catch (InvalidNameException _)
{
@@ -156,14 +156,14 @@ public class ResolveResult implements Serializable
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingComponent(String name)
{
try
{
- remainingName.add(name);
+ remainingName.add(name);
}
catch (InvalidNameException _)
{
@@ -172,7 +172,7 @@ public class ResolveResult implements Serializable
/**
* Set the object to that the part of the name has been resolved.
- *
+ *
* @param obj the object, to that the name has been partially resolved.
*/
public void setResolvedObj(Object obj)
diff --git a/javax/naming/spi/Resolver.java b/javax/naming/spi/Resolver.java
index 67174cfa5..7a009fabc 100644
--- a/javax/naming/spi/Resolver.java
+++ b/javax/naming/spi/Resolver.java
@@ -41,19 +41,19 @@ package javax.naming.spi;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* <p>Represents the object, capable for the at least partial name resolution.
* The object is not necessay capable for the complete name resolution and
* need not implement the {@link Context}.</p>
* <p>
* Both passed parameters and returned results are owned by the caller.</p>
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface Resolver
{
- ResolveResult resolveToClass(Name name,
+ ResolveResult resolveToClass(Name name,
Class<? extends Context> contextType)
throws NamingException;
ResolveResult resolveToClass(String name,
diff --git a/javax/naming/spi/StateFactory.java b/javax/naming/spi/StateFactory.java
index 0c48309e3..d674803a4 100644
--- a/javax/naming/spi/StateFactory.java
+++ b/javax/naming/spi/StateFactory.java
@@ -43,13 +43,13 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* Represents a factory, producing the object states for binding. The operation,
* performed by this factory, is the reverse operation with related to the
* operation, performed by the {@link ObjectFactory}. Classes, implementing
* this interface, must be public and have public parameterless constructor.
- *
+ *
* @see DirStateFactory
* @see ObjectFactory
* @author Warren Levy (warrenl@redhat.com)
@@ -58,7 +58,7 @@ public interface StateFactory
{
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -70,10 +70,10 @@ public interface StateFactory
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- *
+ *
* @see NamingManager#getStateToBind
* @see DirectoryManager#getStateToBind
*/
Object getStateToBind(Object obj, Name name, Context nameCtx,
- Hashtable<?, ?> environment) throws NamingException;
+ Hashtable<?, ?> environment) throws NamingException;
}