You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/06/23 22:53:48 UTC

svn commit: r550106 [4/16] - in /harmony/enhanced/classlib/branches/java6/modules: beans/src/main/java/java/beans/ jndi/META-INF/ jndi/src/main/java/javax/naming/ jndi/src/main/java/javax/naming/directory/ jndi/src/main/java/javax/naming/event/ jndi/sr...

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InitialContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InitialContext.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InitialContext.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InitialContext.java Sat Jun 23 13:53:42 2007
@@ -26,110 +26,111 @@
 
 /**
  * An <code>InitialContext</code> object is required as the starting context
- * for any naming operations.
- * Other contexts and subcontexts may be created later. Contexts may consist 
- * of different implementations according to the needs of the application. All
- * naming operations are performed relative to a context and names are resolved
- * beginning with the initial context.
+ * for any naming operations. Other contexts and subcontexts may be created
+ * later. Contexts may consist of different implementations according to the
+ * needs of the application. All naming operations are performed relative to a
+ * context and names are resolved beginning with the initial context.
  * <p>
- * When constructing an initial context, environment properties from a range
- * of sources may be used to initialize the environment. See the specification
- * of the {@link Context} interface for further details of environment 
- * properties.</p>
+ * When constructing an initial context, environment properties from a range of
+ * sources may be used to initialize the environment. See the specification of
+ * the {@link Context} interface for further details of environment properties.
+ * </p>
  * <p>
- * The environment at runtime determines the initial context implementation.
- * By default, the naming frameworks look for the initial context factory class
- * name in the property <code>Context.INITIAL_CONTEXT_FACTORY</code>. When URL 
- * strings must be resolved, a different policy is used which is described 
- * below.</p>
+ * The environment at runtime determines the initial context implementation. By
+ * default, the naming frameworks look for the initial context factory class
+ * name in the property <code>Context.INITIAL_CONTEXT_FACTORY</code>. When
+ * URL strings must be resolved, a different policy is used which is described
+ * below.
+ * </p>
  * <p>
  * A <code>NoInitialContextException</code> is thrown when it cannot create an
  * initial context. The exception may occur not only during constructor
  * invocation, but may occur later. For example, when a subclass of <code>
- * InitialContext</code> uses the lazy initialization option, <code>
- * InitialContext</code> methods may be invoked later which require the 
- * initialization to be completed at that time using the <code>init</code> 
- * protected method. In these circumstances, <code>NoInitialContextException
- * </code> may be thrown some time after the constructor was invoked. JNDI 
- * applications should be written to be independent of when initial context 
- * is actually initialized.</p>
+ * InitialContext</code>
+ * uses the lazy initialization option, <code>
+ * InitialContext</code> methods
+ * may be invoked later which require the initialization to be completed at that
+ * time using the <code>init</code> protected method. In these circumstances,
+ * <code>NoInitialContextException
+ * </code> may be thrown some time after the
+ * constructor was invoked. JNDI applications should be written to be
+ * independent of when initial context is actually initialized.
+ * </p>
  * <p>
- * If environment property <code>Context.INITIAL_CONTEXT_FACTORY</code> has a 
+ * If environment property <code>Context.INITIAL_CONTEXT_FACTORY</code> has a
  * non-null value, then the specified initial context factory may experience a
- * problem trying to instantiate an initial context and so throw an exception. 
- * It is a responsibility of the service provider implementation as to when an 
- * exception is thrown to report the problem to the JNDI application.</p>
+ * problem trying to instantiate an initial context and so throw an exception.
+ * It is a responsibility of the service provider implementation as to when an
+ * exception is thrown to report the problem to the JNDI application.
+ * </p>
  * <p>
  * URL names comprising a String format described by RFC1738 may be components
  * of names passed to naming operations. Typically, the URL is composed of the
  * "scheme" - such as one of http, ldap, dns - followed by additional text. If
- * the JNDI can identify the URL scheme from the specified name, then it is
- * used to construct a classname suffix in the following form:<br>
+ * the JNDI can identify the URL scheme from the specified name, then it is used
+ * to construct a classname suffix in the following form:<br>
+ * 
  * <pre>
  *     &lt;package_prefix&gt; . &lt;scheme&gt; . &lt;scheme&gt;URLContextFactory
  * </pre>
+ * 
  * Several variants of the classname are constructed using each element of the
- * <code>Context.URL_PACKAGE_PREFIXES</code> environment property. Note that an
- * additional package prefix - "com.sun.jndi.url" - is always considered to be 
- * at the end of those already present in the value of that environment 
- * property. Although a service provider may also provide a URL context 
+ * <code>Context.URL_PACKAGE_PREFIXES</code> environment property. Note that
+ * an additional package prefix - "com.sun.jndi.url" - is always considered to
+ * be at the end of those already present in the value of that environment
+ * property. Although a service provider may also provide a URL context
  * implementation as well as a context implementation, it is not required to do
  * so, and so an arbitrary service provider might not provide for creating URL
- * contexts.</p>
+ * contexts.
+ * </p>
  * <p>
  * If a URL context is successfully created for a specified URL scheme, the
  * factory can create contexts for arbitrary URLs of the same scheme.
  * <code>NamingManager.setInitialContextFactoryBuilder</code> may be used to
  * specify an alternate policy for locating factories for initial contexts and
- * URL contexts.</p>
+ * URL contexts.
+ * </p>
  * <p>
- * On successful completion of <code>InitialContext</code> initialization, the 
+ * On successful completion of <code>InitialContext</code> initialization, the
  * service provider implementation will have returned an appropriate <code>
- * Context</code> object which can be used for looking up and manipulating names
- * which may or may not be URL names. <code>InitialContext</code> methods other
- * than those dealing with environments should delegate context operations to 
- * that <code>Context</code> object.</p>
- *
- * @see Context
+ * Context</code>
+ * object which can be used for looking up and manipulating names which may or
+ * may not be URL names. <code>InitialContext</code> methods other than those
+ * dealing with environments should delegate context operations to that
+ * <code>Context</code> object.
+ * </p>
  * 
+ * @see Context
  */
 public class InitialContext implements Context {
 
     /**
      * Set to the result of the first successful invocation of <code>
-     * NamingManager.getInitialContext</code> by <code>getDefaultInitCtx
-     * </code>.
-     * Initially null. 
+     * NamingManager.getInitialContext</code>
+     * by <code>getDefaultInitCtx
+     * </code>. Initially null.
      */
     protected Context defaultInitCtx;
 
     /**
-     * Set to true when <code>NamingManager.getInitialContext</code> has
-     * been invoked to obtain an initial context.
-     * Initially false.
+     * Set to true when <code>NamingManager.getInitialContext</code> has been
+     * invoked to obtain an initial context. Initially false.
      */
     protected boolean gotDefault;
 
     /**
-     * Contains all those JNDI environment properties that were found in any
-     * of the the sources of JNDI environment properties.
-     * Initially null.
+     * Contains all those JNDI environment properties that were found in any of
+     * the the sources of JNDI environment properties. Initially null.
      */
     protected Hashtable<Object, Object> myProps;
 
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
-     */
-
     /**
      * Constructs an <code>InitialContext</code> instance without using any
-     * environment properties.
-     * This constructor is effectively the same as using constructor
-     * <code>InitialContext((Hashtable)null)</code>.
+     * environment properties. This constructor is effectively the same as using
+     * constructor <code>InitialContext((Hashtable)null)</code>.
      * 
-     * @throws NamingException  If failed to create an <code>InitialContext</code>.
+     * @throws NamingException
+     *             If failed to create an <code>InitialContext</code>.
      */
     public InitialContext() throws NamingException {
         this(null);
@@ -138,30 +139,36 @@
     /**
      * Constructs an <code>InitialContext</code> instance using environment
      * properties in the supplied parameter which may be null.
-     *
-     * @param environment       the JNDI environment properties used to create
-     *                          the context 
-     * @throws NamingException  If failed to create an <code>InitialContext</code>.
+     * 
+     * @param environment
+     *            the JNDI environment properties used to create the context
+     * @throws NamingException
+     *             If failed to create an <code>InitialContext</code>.
      */
     public InitialContext(Hashtable<?, ?> environment) throws NamingException {
         internalInit(environment);
     }
 
     /**
-     * Constructs an <code>InitialContext</code> instance by indicating whether
-     * a lazy initialization is desired.
-     * Effectively, this is the same as using constructor <code>InitialContext()
-     * </code> if lazy initialization is not indicated.
+     * Constructs an <code>InitialContext</code> instance by indicating
+     * whether a lazy initialization is desired. Effectively, this is the same
+     * as using constructor <code>InitialContext()
+     * </code> if lazy
+     * initialization is not indicated.
      * <p>
      * This constructor may be invoked with a parameter value of true and the
      * implementation will defer initialization of the instance. This may be
-     * used in an <code>InitialContext</code> subclass constructor in which 
-     * later action will set up a <code>Hashtable</code> object with appropriate
-     * environment properties and pass that to the <code>init</code> method to
-     * complete initialization of the <code>InitialContext</code> object.</p>
-     *
-     * @param doNotInit         Specifies whether to initialize the new instance.
-     * @throws NamingException  If failed to create an <code>InitialContext</code>.
+     * used in an <code>InitialContext</code> subclass constructor in which
+     * later action will set up a <code>Hashtable</code> object with
+     * appropriate environment properties and pass that to the <code>init</code>
+     * method to complete initialization of the <code>InitialContext</code>
+     * object.
+     * </p>
+     * 
+     * @param doNotInit
+     *            Specifies whether to initialize the new instance.
+     * @throws NamingException
+     *             If failed to create an <code>InitialContext</code>.
      */
     protected InitialContext(boolean doNotInit) throws NamingException {
         if (!doNotInit) {
@@ -172,11 +179,12 @@
     /**
      * Does private initialization.
      * 
-     * @param env               the JNDI environment properties used to create
-     *                          the context 
-     * @throws NamingException  If failed to create an InitialContext.
+     * @param env
+     *            the JNDI environment properties used to create the context
+     * @throws NamingException
+     *             If failed to create an InitialContext.
      */
-    @SuppressWarnings("unchecked") //$NON-NLS-1$
+    @SuppressWarnings("unchecked")
     private void internalInit(Hashtable<?, ?> env) throws NamingException {
 
         // 1. Read the environment parameter used to create this Context
@@ -187,9 +195,8 @@
         }
 
         // 2. Read Applet parameters
-        EnvironmentReader.readAppletParameters(
-            myProps.get(Context.APPLET),
-            myProps);
+        EnvironmentReader.readAppletParameters(myProps.get(Context.APPLET),
+                myProps);
 
         // 3. Read System properties
         EnvironmentReader.readSystemProperties(myProps);
@@ -202,61 +209,70 @@
 
         // 5. No need to read service provider resource files
 
-        // if JNDI standard property "java.naming.factory.initial" has a non-null value
+        // if JNDI standard property "java.naming.factory.initial" has a
+        // non-null value
         if (myProps.containsKey(INITIAL_CONTEXT_FACTORY)) {
-            // call getDefaultInitCtx() to initialize gotDefault and defaultInitCtx
+            // call getDefaultInitCtx() to initialize gotDefault and
+            // defaultInitCtx
             getDefaultInitCtx();
         }
     }
 
     /**
-     * Uses the specified environment parameter together with other JNDI 
-     * properties to initialize this <code>InitialContext</code> object.
-     * The <code>myProps</code> field will be filled with found JNDI properties.
-     * If JNDI standard property "java.naming.factory.initial" has a non-null 
-     * value, then <code>getDefaultInitCtx</code> is invoked to try to 
-     * initialize fields <code>gotDefault</code> and <code>defaultInitCtx</code>
-     * of the <code>InitialContext</code> object.
-     * 
-     * @param env               the JNDI environment properties supplied to 
-     *                          create the context
-     * @throws NamingException  If naming problems are encountered during
-     *                          initialization of these fields.
+     * Uses the specified environment parameter together with other JNDI
+     * properties to initialize this <code>InitialContext</code> object. The
+     * <code>myProps</code> field will be filled with found JNDI properties.
+     * If JNDI standard property "java.naming.factory.initial" has a non-null
+     * value, then <code>getDefaultInitCtx</code> is invoked to try to
+     * initialize fields <code>gotDefault</code> and
+     * <code>defaultInitCtx</code> of the <code>InitialContext</code>
+     * object.
+     * 
+     * @param env
+     *            the JNDI environment properties supplied to create the context
+     * @throws NamingException
+     *             If naming problems are encountered during initialization of
+     *             these fields.
      */
     protected void init(Hashtable<?, ?> env) throws NamingException {
         this.internalInit(env);
     }
 
-    /* 
+    /*
      * Initializes the default initial context.
      * 
-     * @throws NamingException  If failed to initialize this InitialContext.
+     * @throws NamingException If failed to initialize this InitialContext.
      */
     private void initializeDefaultInitCtx() throws NamingException {
         if (!this.gotDefault) {
             this.defaultInitCtx = NamingManager.getInitialContext(myProps);
             if (null == this.defaultInitCtx) {
-                throw new NoInitialContextException("Failed to create an initial context.");  //$NON-NLS-1$
+                throw new NoInitialContextException(
+                        "Failed to create an initial context."); //$NON-NLS-1$
             }
             this.gotDefault = true;
         }
     }
 
     /**
-     * Gets the default underlying <code>Context</code> implementation.
-     * If <code>gotDefault</code> is true, returns the value of <code>
-     * defaultInitCtx</code>. Otherwise, calls <code>NamingManager.getInitialContext
-     * </code> to return an initial context for the current environment into 
-     * <code>defaultInitCtx</code>, then <code>gotDefault</code> is set true.
-     * If the resulting context object is null, a <code>NoInitialContextException
-     * </code> is thrown, otherwise the value of <code>defaultInitCtx</code> is
-     * returned.
-     *
-     * @return                  the default context
+     * Gets the default underlying <code>Context</code> implementation. If
+     * <code>gotDefault</code> is true, returns the value of <code>
+     * defaultInitCtx</code>.
+     * Otherwise, calls <code>NamingManager.getInitialContext
+     * </code> to return
+     * an initial context for the current environment into
+     * <code>defaultInitCtx</code>, then <code>gotDefault</code> is set
+     * true. If the resulting context object is null, a
+     * <code>NoInitialContextException
+     * </code> is thrown, otherwise the value
+     * of <code>defaultInitCtx</code> is returned.
+     * 
+     * @return the default context
      * @throws NoInitialContextException
-     *                          If <code>NamingManager.getInitialContext</code>
-     *                          returns null.
-     * @throws NamingException  If failed to create the default context.
+     *             If <code>NamingManager.getInitialContext</code> returns
+     *             null.
+     * @throws NamingException
+     *             If failed to create the default context.
      */
     protected Context getDefaultInitCtx() throws NamingException {
         initializeDefaultInitCtx();
@@ -267,21 +283,24 @@
      * Returns a non-null context for the specified name of Name representation.
      * <p>
      * If an initial context factory builder has been defined, then the
-     * specified <code>Name</code> parameter is ignored and the result of <code>
-     * getDefaultInitCtx</code> is returned. Otherwise, if the first component 
-     * of the name is not a URL string, then it returns the result of invoking
-     * <code>getDefaultInitCtx</code>. Otherwise, it attempts to return a URL 
-     * context {@link javax.naming.spi.NamingManager#getURLContext(String, Hashtable)},
-     * but if unsuccessful, returns the result of invoking 
-     * <code>getDefaultInitCtx</code>.</p>
-     *
-     * @param name              a name used in a naming operation which may not
-     *                          be null
-     * @return                  a context which may be a URL context
-     * @throws NamingException  If failed to get the desired context.
+     * specified <code>Name</code> parameter is ignored and the result of
+     * <code>
+     * getDefaultInitCtx</code> is returned. Otherwise, if the first
+     * component of the name is not a URL string, then it returns the result of
+     * invoking <code>getDefaultInitCtx</code>. Otherwise, it attempts to
+     * return a URL context
+     * {@link javax.naming.spi.NamingManager#getURLContext(String, Hashtable)},
+     * but if unsuccessful, returns the result of invoking
+     * <code>getDefaultInitCtx</code>.
+     * </p>
+     * 
+     * @param name
+     *            a name used in a naming operation which may not be null
+     * @return a context which may be a URL context
+     * @throws NamingException
+     *             If failed to get the desired context.
      */
-    protected Context getURLOrDefaultInitCtx(Name name)
-        throws NamingException {
+    protected Context getURLOrDefaultInitCtx(Name name) throws NamingException {
         // If the name has components
         if (0 < name.size()) {
             return getURLOrDefaultInitCtx(name.get(0));
@@ -290,29 +309,33 @@
     }
 
     /**
-     * Returns a non-null context for the specified name of string 
+     * Returns a non-null context for the specified name of string
      * representation.
      * <p>
      * If an initial context factory builder has been defined, then the
      * specified name parameter is ignored and the result of <code>
-     * getDefaultInitCtx</code> is returned. Otherwise, if the name is not a URL
-     * string, then it returns the result of invoking <code>getDefaultInitCtx
-     * </code>. Otherwise, it attempts to return a URL context 
-     * {@link javax.naming.spi.NamingManager#getURLContext(String, Hashtable)}, 
+     * getDefaultInitCtx</code>
+     * is returned. Otherwise, if the name is not a URL string, then it returns
+     * the result of invoking <code>getDefaultInitCtx
+     * </code>. Otherwise, it
+     * attempts to return a URL context
+     * {@link javax.naming.spi.NamingManager#getURLContext(String, Hashtable)},
      * but if unsuccessful, returns the result of invoking <code>
-     * getDefaultInitCtx</code>.</p>
-     *
-     * @param name              a name used in a naming operation which may not
-     *                          be null
-     * @return                  a context which may be a URL context
-     * @throws NamingException  If failed to get the desired context.
+     * getDefaultInitCtx</code>.
+     * </p>
+     * 
+     * @param name
+     *            a name used in a naming operation which may not be null
+     * @return a context which may be a URL context
+     * @throws NamingException
+     *             If failed to get the desired context.
      */
     protected Context getURLOrDefaultInitCtx(String name)
-        throws NamingException {
+            throws NamingException {
 
         /*
          * If an initial context factory builder has been defined, then the
-         * specified name parameter is ignored and the result of 
+         * specified name parameter is ignored and the result of
          * getDefaultInitCtx() is returned.
          */
         if (NamingManager.hasInitialContextFactoryBuilder()) {
@@ -321,7 +344,7 @@
 
         if (null == name) {
             // jndi.00=name must not be null
-            throw new NullPointerException(Messages.getString("jndi.00"));  //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("jndi.00")); //$NON-NLS-1$
         }
 
         // If the name has components
@@ -375,17 +398,17 @@
     }
 
     public NamingEnumeration<NameClassPair> list(Name name)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitCtx(name).list(name);
     }
 
     public NamingEnumeration<NameClassPair> list(String name)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitCtx(name).list(name);
     }
 
     public NamingEnumeration<Binding> listBindings(Name name)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitCtx(name).listBindings(name);
     }
 
@@ -450,16 +473,19 @@
     }
 
     /**
-     * Combines two names into a composite name according to the syntax for 
-     * this context. The name <code>prefix</code> is expected to be the name of 
-     * one or more of the immediate parent contexts of this context, so should
-     * be an empty string for an <code>InitialContext</code>.
-     * <code>name</code> is a name relative to this context. 
-     * 
-     * @param name     a <code>Name</code>, may not be null
-     * @param prefix   a <code>Name</code> serves as prefix, may not be null
-     * @return      the combined name
-     * @throws NamingException if an error occurs.
+     * Combines two names into a composite name according to the syntax for this
+     * context. The name <code>prefix</code> is expected to be the name of one
+     * or more of the immediate parent contexts of this context, so should be an
+     * empty string for an <code>InitialContext</code>. <code>name</code>
+     * is a name relative to this context.
+     * 
+     * @param name
+     *            a <code>Name</code>, may not be null
+     * @param prefix
+     *            a <code>Name</code> serves as prefix, may not be null
+     * @return the combined name
+     * @throws NamingException
+     *             if an error occurs.
      */
     public String composeName(String name, String prefix)
             throws NamingException {
@@ -467,13 +493,12 @@
     }
 
     public Object addToEnvironment(String propName, Object propVal)
-        throws NamingException {
+            throws NamingException {
         this.myProps.put(propName, propVal);
         return getDefaultInitCtx().addToEnvironment(propName, propVal);
     }
 
-    public Object removeFromEnvironment(String propName)
-        throws NamingException {
+    public Object removeFromEnvironment(String propName) throws NamingException {
         this.myProps.remove(propName);
         return getDefaultInitCtx().removeFromEnvironment(propName);
     }
@@ -491,4 +516,5 @@
     public String getNameInNamespace() throws NamingException {
         return getDefaultInitCtx().getNameInNamespace();
     }
+
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InsufficientResourcesException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InsufficientResourcesException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InsufficientResourcesException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InsufficientResourcesException.java Sat Jun 23 13:53:42 2007
@@ -15,43 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * This is the <code>NamingException</code> used when limited resources 
+ * This is the <code>NamingException</code> used when limited resources
  * prevent completion of a request.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class InsufficientResourcesException extends NamingException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = 6227672693037844532L; // J2SE 1.4.2
+    static final long serialVersionUID = 6227672693037844532L;
 
     /**
-     * Constructs an <code>InsufficientResourcesException</code> instance 
-     * with all data initialized to null.
+     * Constructs an <code>InsufficientResourcesException</code> instance with
+     * all data initialized to null.
      */
     public InsufficientResourcesException() {
         super();
     }
 
     /**
-     * Constructs an <code>InsufficientResourcesException</code> instance
-     * with the specified message. 
+     * Constructs an <code>InsufficientResourcesException</code> instance with
+     * the specified message.
      * 
-     * @param s The detail message for the exception. It may be null.
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public InsufficientResourcesException(String s) {
         super(s);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InterruptedNamingException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InterruptedNamingException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InterruptedNamingException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InterruptedNamingException.java Sat Jun 23 13:53:42 2007
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
@@ -23,35 +22,34 @@
  * interrupted.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class InterruptedNamingException extends NamingException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = 6404516648893194728L; // J2SE 1.4.2	
+    static final long serialVersionUID = 6404516648893194728L;
 
     /**
-     * Constructs an <code>InterruptedNamingException</code> instance 
-     * with all data initialized to null.
+     * Constructs an <code>InterruptedNamingException</code> instance with all
+     * data initialized to null.
      */
     public InterruptedNamingException() {
         super();
     }
 
     /**
-     * Constructs an <code>InterruptedNamingException</code> instance
-     * with the specified message.
+     * Constructs an <code>InterruptedNamingException</code> instance with the
+     * specified message.
      * 
-     * @param s The detail message for the exception. It may be null.
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public InterruptedNamingException(String s) {
         super(s);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InvalidNameException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InvalidNameException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InvalidNameException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InvalidNameException.java Sat Jun 23 13:53:42 2007
@@ -15,49 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * An <code>InvalidNameException</code> is the <code>NamingException</code> 
- * used when a supplied name does not match the required format. 
+ * An <code>InvalidNameException</code> is the <code>NamingException</code>
+ * used when a supplied name does not match the required format.
  * <p>
- * Multithreaded access to a <code>InvalidNameException</code> instance is 
- * only safe when client code locks the object first.</p>
- * 
+ * Multithreaded access to a <code>InvalidNameException</code> instance is
+ * only safe when client code locks the object first.
+ * </p>
  */
 public class InvalidNameException extends NamingException {
 
     /*
-     * For serialization purposes, the following fields must appear in the
-     * order given and specified serialVersionUID must be used.
-     */
-    static final long serialVersionUID = -8370672380823801105L; // J2SE 1.4.2
-
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
+    static final long serialVersionUID = -8370672380823801105L;
 
     /**
-     * Constructs an <code>InvalidNameException</code> instance 
-     * with all data initialized to null.
+     * Constructs an <code>InvalidNameException</code> instance with all data
+     * initialized to null.
      */
     public InvalidNameException() {
         super();
     }
 
     /**
-     * Constructs an <code>InvalidNameException</code> instance 
-     * with a specified error message.
+     * Constructs an <code>InvalidNameException</code> instance with a
+     * specified error message.
      * 
-     * @param msg The detail message for the exception. It may be null.
+     * @param msg
+     *            The detail message for the exception. It may be null.
      */
     public InvalidNameException(String msg) {
         super(msg);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LimitExceededException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LimitExceededException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LimitExceededException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LimitExceededException.java Sat Jun 23 13:53:42 2007
@@ -15,42 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * This is the <code>NamingException</code> used when a restriction is exceeded.
+ * This is the <code>NamingException</code> used when a restriction is
+ * exceeded.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class LimitExceededException extends NamingException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = -776898738660207856L; // J2SE 1.4.2
+    static final long serialVersionUID = -776898738660207856L;
 
     /**
-     * Constructs a <code>LimitExceededException</code> instance 
-     * with all data initialized to null.
+     * Constructs a <code>LimitExceededException</code> instance with all data
+     * initialized to null.
      */
     public LimitExceededException() {
         super();
     }
 
     /**
-     * Constructs a <code>LimitExceededException</code> instance 
-     * with the specified message.
+     * Constructs a <code>LimitExceededException</code> instance with the
+     * specified message.
      * 
-     * @param s The detail message for the exception. It may be null.
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public LimitExceededException(String s) {
         super(s);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkException.java Sat Jun 23 13:53:42 2007
@@ -15,23 +15,22 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * Naming operations may throw a <code>LinkException</code> when attempting 
- * to resolve links. Methods are provided to save diagnostic information about how far
- * link resolution has progressed.
+ * Naming operations may throw a <code>LinkException</code> when attempting to
+ * resolve links. Methods are provided to save diagnostic information about how
+ * far link resolution has progressed.
  * <p>
- * Multithreaded access to a single <code>LinkException</code> instance is only
- * safe when client code uses appropriate synchronization and locking.</p>
- * 
+ * Multithreaded access to a single <code>LinkException</code> instance is
+ * only safe when client code uses appropriate synchronization and locking.
+ * </p>
  */
 public class LinkException extends NamingException {
 
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
     private final static long serialVersionUID = -7967662604076777712L;
 
@@ -41,7 +40,7 @@
     protected String linkExplanation;
 
     /**
-     * Composite name containing the name which could not be resolved. 
+     * Composite name containing the name which could not be resolved.
      */
     protected Name linkRemainingName;
 
@@ -55,42 +54,31 @@
      */
     protected Object linkResolvedObj;
 
-    /*
-     * ==========================================
-     * constructors
-     * ==========================================
-     */
-
     /**
-     * Constructs a <code>LinkException</code> instance 
-     * with all data initialized to null.
+     * Constructs a <code>LinkException</code> instance with all data
+     * initialized to null.
      */
     public LinkException() {
         super();
     }
 
     /**
-     * Constructs a <code>LinkException</code> instance
-     * with the specified message.
+     * Constructs a <code>LinkException</code> instance with the specified
+     * message.
      * 
-     * @param s The detail message for the exception. It may be null.
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public LinkException(String s) {
         super(s);
     }
 
-    /*
-     * ==========================================
-     * methods
-     * ==========================================
-     */
-
     /**
-     * Outputs the string representation of this <code>NamingException</code> 
+     * Outputs the string representation of this <code>NamingException</code>
      * together with the details of the remaining name.
      * 
-     * @return the string representation of this <code>NamingException</code> 
-     * together with the details of the remaining name.
+     * @return the string representation of this <code>NamingException</code>
+     *         together with the details of the remaining name.
      */
     @Override
     public String toString() {
@@ -99,27 +87,28 @@
 
     private String toStringImpl(boolean b) {
         StringBuffer sb = new StringBuffer(super.toString());
-        sb.append("; the link remaining name is - '").append(linkRemainingName).append( //$NON-NLS-1$
-            "'"); //$NON-NLS-1$
+        sb
+                .append("; the link remaining name is - '").append(linkRemainingName).append( //$NON-NLS-1$
+                        "'"); //$NON-NLS-1$
         if (b && null != linkResolvedObj) {
             sb.append("; the link resolved object is - '").append( //$NON-NLS-1$
-                linkResolvedObj).append(
-                "'"); //$NON-NLS-1$
+                    linkResolvedObj).append("'"); //$NON-NLS-1$
         }
         return sb.toString();
     }
 
     /**
-     * Outputs the string representation of this <code>NamingException</code> 
+     * Outputs the string representation of this <code>NamingException</code>
      * together with the details of the remaining name.
-     * <p> 
+     * <p>
      * If boolean b is set to true then also outputs the resolved object.<br/>
-     * If boolean b is set to false then the behavior is the same 
-     * as <code>toString()</code>.
+     * If boolean b is set to false then the behavior is the same as
+     * <code>toString()</code>.
      * 
-     * @param b Indicates if the resolved object need to be outputted.
-     * @return  the string representation of this <code>NamingException</code> 
-     * together with the details of the remaining name.
+     * @param b
+     *            Indicates if the resolved object need to be outputted.
+     * @return the string representation of this <code>NamingException</code>
+     *         together with the details of the remaining name.
      */
     @Override
     public String toString(boolean b) {
@@ -165,44 +154,47 @@
     /**
      * Sets the <code>linkExplanation</code> field to the specified value.
      * 
-     * @param string the new <code>linkExplanation</code> value to be set.
+     * @param string
+     *            the new <code>linkExplanation</code> value to be set.
      */
     public void setLinkExplanation(String string) {
         linkExplanation = string;
     }
 
     /**
-     * Sets the <code>linkRemainingName</code> to the specified name. 
-     * It may be null. The remaining name details must not change even if 
-     * the original <code>Name</code> itself changes.
-     * 
-     * @param name the new <code>linkRemainingName</code> value to be set. 
-     * It may be null.
+     * Sets the <code>linkRemainingName</code> to the specified name. It may
+     * be null. The remaining name details must not change even if the original
+     * <code>Name</code> itself changes.
+     * 
+     * @param name
+     *            the new <code>linkRemainingName</code> value to be set. It
+     *            may be null.
      */
     public void setLinkRemainingName(Name name) {
         linkRemainingName = null == name ? null : (Name) name.clone();
     }
 
     /**
-     * Sets the <code>linkResolvedName</code> to the specified name. 
-     * This may be null. The resolved name details must not change even if 
-     * the original <code>Name</code> itself changes.
-     *      
-     * @param name the new <code>linkResolvedName</code> value to be set.
+     * Sets the <code>linkResolvedName</code> to the specified name. This may
+     * be null. The resolved name details must not change even if the original
+     * <code>Name</code> itself changes.
+     * 
+     * @param name
+     *            the new <code>linkResolvedName</code> value to be set.
      */
     public void setLinkResolvedName(Name name) {
         linkResolvedName = null == name ? null : (Name) name.clone();
     }
 
     /**
-     * Sets the <code>linkResolvedObj</code> field to object. This may be null.
+     * Sets the <code>linkResolvedObj</code> field to object. This may be
+     * null.
      * 
-     * @param object the new <code>linkResolvedObj</code> value to be set.
+     * @param object
+     *            the new <code>linkResolvedObj</code> value to be set.
      */
     public void setLinkResolvedObj(Object object) {
         linkResolvedObj = object;
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkLoopException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkLoopException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkLoopException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkLoopException.java Sat Jun 23 13:53:42 2007
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
@@ -23,35 +22,34 @@
  * or if too many links are being done.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class LinkLoopException extends LinkException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = -3119189944325198009L;
+    static final long serialVersionUID = -3119189944325198009L;
 
     /**
-     * Constructs a <code>LinkLoopException</code> instance 
-     * with all data initialized to null.
+     * Constructs a <code>LinkLoopException</code> instance with all data
+     * initialized to null.
      */
     public LinkLoopException() {
         super();
     }
 
     /**
-     * Constructs a <code>LinkLoopException</code> instance 
-     * with the specified message.
-     *  
-     * @param s The detail message for the exception. It may be null.
+     * Constructs a <code>LinkLoopException</code> instance with the specified
+     * message.
+     * 
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public LinkLoopException(String s) {
         super(s);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkRef.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkRef.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/LinkRef.java Sat Jun 23 13:53:42 2007
@@ -15,107 +15,90 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 import org.apache.harmony.jndi.internal.nls.Messages;
 
 /**
- * This is a type of <code>Reference</code> used to point to an address of type
- * "LinkAddress" where the address given is actually the string representation 
- * of a valid <code>Name</code>.
- *
- * @see Reference
+ * This is a type of <code>Reference</code> used to point to an address of
+ * type "LinkAddress" where the address given is actually the string
+ * representation of a valid <code>Name</code>.
  * 
+ * @see Reference
  */
 public class LinkRef extends Reference {
 
     /*
-     * -------------------------------------------------------------------
-     * Constants
-     * -------------------------------------------------------------------
-     */
-
-    /*
-     * This constant is used during deserialization to check the J2SE version which
+     * This constant is used during deserialization to check the version which
      * created the serialized object.
      */
-    static final long serialVersionUID = -5386290613498931298L; //J2SE 1.4.2
+    static final long serialVersionUID = -5386290613498931298L;
 
     /*
      * The type name of the address this LinkRef points to.
      */
     private static final String ADDR_TYPE = "LinkAddress"; //$NON-NLS-1$
 
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Constructs a <code>LinkRef</code> instance using the supplied <code>name
-     * </code> of <code>Name</code> representation.
-     * The class name is set to the name of this <code>LinkRef</code> class. 
-     * The factory class and location default to null. There is one address 
-     * entry which has "LinkAddress" as the address type and the string 
-     * representation of the supplied name as the address.
+     * Constructs a <code>LinkRef</code> instance using the supplied
+     * <code>name
+     * </code> of <code>Name</code> representation. The class name
+     * is set to the name of this <code>LinkRef</code> class. The factory
+     * class and location default to null. There is one address entry which has
+     * "LinkAddress" as the address type and the string representation of the
+     * supplied name as the address.
      * 
-     * @param name          the <code>Name</code> to be used as a link which
-     *                      cannot be null
+     * @param name
+     *            the <code>Name</code> to be used as a link which cannot be
+     *            null
      */
     public LinkRef(Name name) {
         this(name.toString());
     }
 
     /**
-     * Constructs a <code>LinkRef</code> instance using the supplied <code>name
-     * </code> of <code>String</code> representation.
-     * The class name is set to the name of this <code>LinkRef</code> class. 
-     * The factory class and location default to null. There is one address 
-     * entry which has "LinkAddress" as the address type and the string 
-     * representation of the supplied name as the address.
+     * Constructs a <code>LinkRef</code> instance using the supplied
+     * <code>name
+     * </code> of <code>String</code> representation. The class
+     * name is set to the name of this <code>LinkRef</code> class. The factory
+     * class and location default to null. There is one address entry which has
+     * "LinkAddress" as the address type and the string representation of the
+     * supplied name as the address.
      * 
-     * @param s          the name to be used as a link which cannot be null
+     * @param s
+     *            the name to be used as a link which cannot be null
      */
     public LinkRef(String s) {
         super(LinkRef.class.getName(), new StringRefAddr(ADDR_TYPE, s));
     }
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     /**
      * Gets the string representation of the name used as a link which cannot be
      * null.
      * 
-     * @return              the string representation of the name used as a link
-     * @throws MalformedLinkException 
-     *                      If this is not a <code>Reference</code> with a class 
-     *                      name which matches the name of this LinkRef class.
+     * @return the string representation of the name used as a link
+     * @throws MalformedLinkException
+     *             If this is not a <code>Reference</code> with a class name
+     *             which matches the name of this LinkRef class.
      * @throws NamingException
-     *                      If other <code>NamingException</code> is encountered.
+     *             If other <code>NamingException</code> is encountered.
      */
     public String getLinkName() throws NamingException {
         if (!LinkRef.class.getName().equals(this.getClassName())) {
             // jndi.11=This is an invalid LinkRef object\!
-            throw new MalformedLinkException(Messages.getString("jndi.11"));  //$NON-NLS-1$
+            throw new MalformedLinkException(Messages.getString("jndi.11")); //$NON-NLS-1$
         }
         try {
             RefAddr addr = get(ADDR_TYPE);
             if (null == addr) {
                 // jndi.12=There is no address with type: {0}
-                throw new MalformedLinkException(
-                        Messages.getString("jndi.12", ADDR_TYPE));  //$NON-NLS-1$
+                throw new MalformedLinkException(Messages.getString(
+                        "jndi.12", ADDR_TYPE)); //$NON-NLS-1$
             }
             return (String) addr.getContent();
         } catch (NullPointerException e) {
             throw new MalformedLinkException(e.getMessage());
         }
     }
-}
-
 
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/MalformedLinkException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/MalformedLinkException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/MalformedLinkException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/MalformedLinkException.java Sat Jun 23 13:53:42 2007
@@ -15,43 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * This is the <code>NamingException</code> used when a link turns out to
- * be malformed.
+ * This is the <code>NamingException</code> used when a link turns out to be
+ * malformed.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class MalformedLinkException extends LinkException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = -3066740437737830242L;
+    static final long serialVersionUID = -3066740437737830242L;
 
     /**
-     * Constructs a <code>MalformedLinkException</code> instance 
-     * with all data initialized to null.
+     * Constructs a <code>MalformedLinkException</code> instance with all data
+     * initialized to null.
      */
     public MalformedLinkException() {
         super();
     }
 
     /**
-     * Constructs a <code>MalformedLinkException</code> instance
-     * with the specified message.
+     * Constructs a <code>MalformedLinkException</code> instance with the
+     * specified message.
      * 
-     * @param arg0 The detail message for the exception. It may be null.
+     * @param arg0
+     *            The detail message for the exception. It may be null.
      */
     public MalformedLinkException(String arg0) {
         super(arg0);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/Name.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/Name.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/Name.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/Name.java Sat Jun 23 13:53:42 2007
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 import java.io.Serializable;
@@ -24,39 +23,35 @@
 /**
  * A <code>Name</code> interface represents a name in a naming service.
  * <p>
- * A name which implements this interface has a sequence of zero or more 
+ * A name which implements this interface has a sequence of zero or more
  * elements delimited by separators. Each element can be accessed using its
- * position. The first element is at position 0.</p>
+ * position. The first element is at position 0.
+ * </p>
  * <p>
- * This interface is implemented by 2 classes - <code>CompoundName</code> 
- * and <code>CompositeName</code>.</p>
+ * This interface is implemented by 2 classes - <code>CompoundName</code> and
+ * <code>CompositeName</code>.
+ * </p>
  * <p>
  * Examples of names are:
+ * 
  * <pre>
  * File system name - for example /home/jenningm/.profile
  * DNS hostname     - for example www.apache.org
  * Internet URL     - for example http://www.eclipse.org/org/index.html
- * </pre></p>
+ * </pre>
+ * 
+ * </p>
  * 
  * @see CompositeName
  * @see CompoundName
  */
 public interface Name extends Cloneable, Serializable, Comparable<Object> {
 
-    /*
-     * SUID declared publicly in the spec.
-     */
     public static final long serialVersionUID = -3617482732056931635L;
-    
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
 
     /**
-     * Get all the elements of this <code>Name</code>.
-     * If the <code>Name</code> is empty then return an empty 
+     * Get all the elements of this <code>Name</code>. If the
+     * <code>Name</code> is empty then return an empty
      * <code>Enumeration</code>.
      * 
      * @return an enumeration of <code>Name</code> elements - cannot be null
@@ -66,98 +61,114 @@
     /**
      * Get an element of this <code>Name</code>.
      * 
-     * @param i the index of the required element - must be greater
-     *          than or equal to 0 and less than size().
-     * @return  the element at the specified position
-     * @throws ArrayIndexOutOfBoundsException when the position is invalid. 
-     *          If the <code>Name</code> is empty this always returns 
-     *          <code>ArrayIndexOutOfBoundsException</code>
+     * @param i
+     *            the index of the required element - must be greater than or
+     *            equal to 0 and less than size().
+     * @return the element at the specified position
+     * @throws ArrayIndexOutOfBoundsException
+     *             when the position is invalid. If the <code>Name</code> is
+     *             empty this always returns
+     *             <code>ArrayIndexOutOfBoundsException</code>
      */
     public String get(int i);
 
     /**
-     * Create a new <code>Name</code> which comprises the first several 
+     * Create a new <code>Name</code> which comprises the first several
      * elements of this <code>Name</code>.
      * 
-     * @param i the index of the first element not to be included - must be 
-     *          greater than or equal to 0 and less than or equal to size. 
-     *          If 0 then an empty name is returned.
-     * @return  a new <code>Name</code> which comprises the first several 
-     *          elements of this <code>Name</code>
-     * @throws ArrayIndexOutOfBoundsException when the position is invalid.
+     * @param i
+     *            the index of the first element not to be included - must be
+     *            greater than or equal to 0 and less than or equal to size. If
+     *            0 then an empty name is returned.
+     * @return a new <code>Name</code> which comprises the first several
+     *         elements of this <code>Name</code>
+     * @throws ArrayIndexOutOfBoundsException
+     *             when the position is invalid.
      */
     public Name getPrefix(int i);
-    
+
     /**
-     * Create a new <code>Name</code> which comprises the last 
-     * (<code>size() - i</code>) elements of this <code>Name</code>.
+     * Create a new <code>Name</code> which comprises the last (<code>size() - i</code>)
+     * elements of this <code>Name</code>.
      * 
-     * @param i the index of the first element to be included - must be 
-     *          greater than or equal to 0 and less than size.
-     * @return  a new <code>Name</code> which comprises the last 
-     *          (<code>size() - i</code>) elements of this 
-     *          <code>Name</code>
-     * @throws ArrayIndexOutOfBoundsException when the position is invalid.
+     * @param i
+     *            the index of the first element to be included - must be
+     *            greater than or equal to 0 and less than size.
+     * @return a new <code>Name</code> which comprises the last (<code>size() - i</code>)
+     *         elements of this <code>Name</code>
+     * @throws ArrayIndexOutOfBoundsException
+     *             when the position is invalid.
      */
     public Name getSuffix(int i);
-    
+
     /**
-     * Append a name to this <code>Name</code>. The name itself may have a 
+     * Append a name to this <code>Name</code>. The name itself may have a
      * number of elements.
      * 
-     * @param name  the name to append onto this <code>Name</code>.
-     * @return      this <code>Name</code>
-     * @throws InvalidNameException if name is invalid or the addition of the
-     *              name results in this <code>Name</code> becoming invalid.
+     * @param name
+     *            the name to append onto this <code>Name</code>.
+     * @return this <code>Name</code>
+     * @throws InvalidNameException
+     *             if name is invalid or the addition of the name results in
+     *             this <code>Name</code> becoming invalid.
      */
     public Name addAll(Name name) throws InvalidNameException;
-    
+
     /**
-     * Insert a name within this <code>Name</code> at the specified position. 
+     * Insert a name within this <code>Name</code> at the specified position.
      * The name itself may have a number of elements.
      * 
-     * @param i     the index of the element where to start inserting the name
-     *              - must be greater than or equal to 0 and less than or equal
-     *              to size.
-     * @param name  the name to insert into this <code>Name</code>.
-     * @return      this <code>Name</code>
-     * @throws InvalidNameException  if name is invalid or the addition of the
-     *              name results in this <code>Name</code> becoming invalid.
+     * @param i
+     *            the index of the element where to start inserting the name -
+     *            must be greater than or equal to 0 and less than or equal to
+     *            size.
+     * @param name
+     *            the name to insert into this <code>Name</code>.
+     * @return this <code>Name</code>
+     * @throws InvalidNameException
+     *             if name is invalid or the addition of the name results in
+     *             this <code>Name</code> becoming invalid.
      */
     public Name addAll(int i, Name name) throws InvalidNameException;
 
     /**
      * Append an element to this <code>Name</code>.
      * 
-     * @param s the string to append
-     * @return  this <code>Name</code>
-     * @throws InvalidNameException if the addition of the element results in
-     *          this <code>Name</code> becoming invalid.
+     * @param s
+     *            the string to append
+     * @return this <code>Name</code>
+     * @throws InvalidNameException
+     *             if the addition of the element results in this
+     *             <code>Name</code> becoming invalid.
      */
     public Name add(String s) throws InvalidNameException;
-    
+
     /**
-     * Insert an element within this <code>Name</code> at the specified 
+     * Insert an element within this <code>Name</code> at the specified
      * position.
      * 
-     * @param i the index of the element where to insert the element - 
-     *          must be greater than or equal to 0 and less than or equal to
-     *          size.
-     * @param s the String to insert
-     * @return  this <code>Name</code>.
-     * @throws InvalidNameException if the insertion of the element results in
-     *          this Name becoming invalid.
+     * @param i
+     *            the index of the element where to insert the element - must be
+     *            greater than or equal to 0 and less than or equal to size.
+     * @param s
+     *            the String to insert
+     * @return this <code>Name</code>.
+     * @throws InvalidNameException
+     *             if the insertion of the element results in this Name becoming
+     *             invalid.
      */
     public Name add(int i, String s) throws InvalidNameException;
 
     /**
      * Delete an element from this <code>Name</code>.
      * 
-     * @param i the index of the element to delete - must be greater
-     *          than or equal to 0 and less than size.
-     * @return  the deleted element
-     * @throws InvalidNameException if the deletion of the element results in
-     *          this <code>Name</code> becoming invalid.
+     * @param i
+     *            the index of the element to delete - must be greater than or
+     *            equal to 0 and less than size.
+     * @return the deleted element
+     * @throws InvalidNameException
+     *             if the deletion of the element results in this
+     *             <code>Name</code> becoming invalid.
      */
     public Object remove(int i) throws InvalidNameException;
 
@@ -167,52 +178,54 @@
      * @return a complete (deep) copy of the object.
      */
     public Object clone();
-    
+
     /**
-     * Compare this <code>Name</code> with the one supplied as a parameter. 
-     * Each class which implements this interface will have a specification 
-     * of how to do the comparison.
-     * 
-     * @param o the object to compare - cannot be null.
-     * @return  a negative number means this is less than the supplied object.
-     *          a positive number means this is greater than the supplied 
-     *          object. Zero means the two objects are equal. 
+     * Compare this <code>Name</code> with the one supplied as a parameter.
+     * Each class which implements this interface will have a specification of
+     * how to do the comparison.
+     * 
+     * @param o
+     *            the object to compare - cannot be null.
+     * @return a negative number means this is less than the supplied object. a
+     *         positive number means this is greater than the supplied object.
+     *         Zero means the two objects are equal.
      */
     public int compareTo(Object o);
-    
+
     /**
-     * Get the size of this <code>Name</code>. The size of a <code>Name</code>
-     * is its number of elements.
+     * Get the size of this <code>Name</code>. The size of a
+     * <code>Name</code> is its number of elements.
      * 
      * @return the size of this name - cannot be null - can be zero
      */
     public int size();
-    
+
     /**
-     * Check if this <code>Name</code> is empty. A <code>Name</code> is empty
-     * when it has no elements.
+     * Check if this <code>Name</code> is empty. A <code>Name</code> is
+     * empty when it has no elements.
      * 
      * @return true if empty, else returns false
      */
     public boolean isEmpty();
 
     /**
-     * Check if this <code>Name</code> starts with the elements in the 
+     * Check if this <code>Name</code> starts with the elements in the
      * supplied name. The supplied name itself may have a number of elements.
      * 
-     * @param name  the name to check against this name
-     * @return      true when the supplied name matches else returns false
+     * @param name
+     *            the name to check against this name
+     * @return true when the supplied name matches else returns false
      */
     public boolean startsWith(Name name);
 
     /**
-     * Check if this <code>Name</code> ends with the elements in the supplied 
+     * Check if this <code>Name</code> ends with the elements in the supplied
      * name. The supplied name itself may have a number of elements.
      * 
-     * @param name  the name to check against this name.
-     * @return      true when the supplied name matches else returns false.
+     * @param name
+     *            the name to check against this name.
+     * @return true when the supplied name matches else returns false.
      */
     public boolean endsWith(Name name);
-}
-
 
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameAlreadyBoundException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameAlreadyBoundException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameAlreadyBoundException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameAlreadyBoundException.java Sat Jun 23 13:53:42 2007
@@ -15,43 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * This is the <code>NamingException</code> used when trying to add a name 
+ * This is the <code>NamingException</code> used when trying to add a name
  * which is already bound.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class NameAlreadyBoundException extends NamingException {
 
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = -8491441000356780586L;
+    static final long serialVersionUID = -8491441000356780586L;
 
     /**
-     * Constructor a <code>NameAlreadyBoundException</code> instance 
-     * with all data initialized to null.
+     * Constructor a <code>NameAlreadyBoundException</code> instance with all
+     * data initialized to null.
      */
     public NameAlreadyBoundException() {
         super();
     }
 
     /**
-     * Constructor a <code>NameAlreadyBoundException</code> instance
-     * with the specified message. 
+     * Constructor a <code>NameAlreadyBoundException</code> instance with the
+     * specified message.
      * 
-     * @param arg0 The detail message for the exception. It may be null.
+     * @param arg0
+     *            The detail message for the exception. It may be null.
      */
     public NameAlreadyBoundException(String arg0) {
         super(arg0);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameClassPair.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameClassPair.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameClassPair.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameClassPair.java Sat Jun 23 13:53:42 2007
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 import java.io.Serializable;
@@ -23,36 +22,24 @@
 import org.apache.harmony.jndi.internal.nls.Messages;
 
 /**
- * <code>NameClassPair</code> associates a name in a naming service with a 
- * specified class name and also with a relative flag. In JNDI, 
+ * <code>NameClassPair</code> associates a name in a naming service with a
+ * specified class name and also with a relative flag. In JNDI,
  * <code>NameClassPair</code> is extended by <code>javax.naming.Binding</code>;
  * <code>Binding</code> objects are used in <code>javax.naming.Context</code>
  * implementations.
  * <p>
- * A <code>NameClassPair</code> object is not thread-safe unless appropriate 
- * synchronization is applied to any code manipulating these objects.</p>
+ * A <code>NameClassPair</code> object is not thread-safe unless appropriate
+ * synchronization is applied to any code manipulating these objects.
+ * </p>
  * <p>
- * As this class implements the <code>Serializable</code> interface, it is 
- * important that fields below are declared with the same names.</p>
- * 
+ * As this class implements the <code>Serializable</code> interface, it is
+ * important that fields below are declared with the same names.
+ * </p>
  */
 public class NameClassPair implements Serializable {
 
-    /*
-     * -------------------------------------------------------------------
-     * Constants
-     * -------------------------------------------------------------------
-     */
-
-    // J2SE 1.5.0
     private static final long serialVersionUID = 5620776610160863339L;
 
-    /*
-     * -------------------------------------------------------------------
-     * Instance variables
-     * -------------------------------------------------------------------
-     */
-
     /**
      * The name used in a naming service. This field may be null and has default
      * value of null.
@@ -62,54 +49,52 @@
     private String name;
 
     /**
-     * The class of an object represented by this name in a naming service.
-     * This field may be null and has default value null.
+     * The class of an object represented by this name in a naming service. This
+     * field may be null and has default value null.
      * 
      * @serial
      */
     private String className;
 
     /**
-     *
+     * 
      * @serial
      */
     private String fullName;
 
     /**
-     * This flag indicates whether the name s used in a naming service is relative
-     * to the context. It is set by setRelative and is not derived. This field has
-     * default value true. If this is set to false then the name is not relative and
-     * is actually a URL.
+     * This flag indicates whether the name s used in a naming service is
+     * relative to the context. It is set by setRelative and is not derived.
+     * This field has default value true. If this is set to false then the name
+     * is not relative and is actually a URL.
      * 
      * @serial
      */
     private boolean isRel;
 
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Construct a <code>NameClassPair</code> from a name and a class.
-     * Both arguments can be null.
-     * Relative flag is true.
+     * Construct a <code>NameClassPair</code> from a name and a class. Both
+     * arguments can be null. Relative flag is true.
      * 
-     * @param name      a name used in naming service
-     * @param className a class name
+     * @param name
+     *            a name used in naming service
+     * @param className
+     *            a class name
      */
     public NameClassPair(String name, String className) {
         this(name, className, true);
     }
 
     /**
-     * Construct a <code>NameClassPair</code> from a name, a class and a 
+     * Construct a <code>NameClassPair</code> from a name, a class and a
      * relative flag. The name and class arguments can be null.
      * 
-     * @param name      a name used in naming service
-     * @param className a class name
-     * @param relative  a relative flag
+     * @param name
+     *            a name used in naming service
+     * @param className
+     *            a class name
+     * @param relative
+     *            a relative flag
      */
     public NameClassPair(String name, String className, boolean relative) {
         if (name == null) {
@@ -122,12 +107,6 @@
         this.fullName = null;
     }
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     /**
      * Returns the value of the class which may be null.
      * 
@@ -158,7 +137,8 @@
     /**
      * Set the class of this object. The argument can be null.
      * 
-     * @param className a class name
+     * @param className
+     *            a class name
      */
     public void setClassName(String className) {
         this.className = className;
@@ -167,7 +147,8 @@
     /**
      * Set the name of this object. The argument can be null.
      * 
-     * @param name  a name used in naming service
+     * @param name
+     *            a name used in naming service
      */
     public void setName(String name) {
         if (name == null) {
@@ -180,7 +161,8 @@
     /**
      * Set the isRelative flag field of this object.
      * 
-     * @param relative  a relative flag
+     * @param relative
+     *            a relative flag
      */
     public void setRelative(boolean relative) {
         this.isRel = relative;
@@ -190,13 +172,14 @@
      * Returns the value of the full name field which may be null.
      * 
      * @return the value of the full name field which may be null.
-     *
+     * 
      * @throws UnsupportedOperationException
      */
     public String getNameInNamespace() {
         if (fullName == null) {
             // jndi.01=full name doesn't apply to this binding
-            throw new UnsupportedOperationException(Messages.getString("jndi.01")); //$NON-NLS-1$
+            throw new UnsupportedOperationException(Messages
+                    .getString("jndi.01")); //$NON-NLS-1$
         }
         return fullName;
     }
@@ -204,22 +187,16 @@
     /**
      * Set the full name of this object. The argument can be null.
      * 
-     * @param fullName  a full name
+     * @param fullName
+     *            a full name
      */
     public void setNameInNamespace(String fullName) {
         this.fullName = fullName;
     }
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods override parent class Object
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * If the flag is set to false then the string is preceded with
-     * "(not relative)" and then has the name value, ": " and the class
-     * value.
+     * If the flag is set to false then the string is preceded with "(not
+     * relative)" and then has the name value, ": " and the class value.
      * 
      * @return a string representation of this object
      */
@@ -236,5 +213,3 @@
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameImpl.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameImpl.java Sat Jun 23 13:53:42 2007
@@ -18,13 +18,12 @@
 package javax.naming;
 
 /**
- * A useless class required to satisfy the requirement for an 'impl'
- * field (see CompoundName.java).
+ * A class required to satisfy the requirement for an 'impl' field.
+ * 
+ * @see CompoundName
  */
 class NameImpl {
     protected NameImpl() {
         super();
     }
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameNotFoundException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameNotFoundException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameNotFoundException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameNotFoundException.java Sat Jun 23 13:53:42 2007
@@ -15,43 +15,41 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * This is the <code>NamingException</code> used when part of a name cannot
- * be found.
+ * This is the <code>NamingException</code> used when part of a name cannot be
+ * found.
  * <p>
  * Multithreaded access to an instance is only safe when client code locks the
- * object first.</p>
- * 
+ * object first.
+ * </p>
  */
 public class NameNotFoundException extends NamingException {
-	
+
     /*
-     * This constant is used during deserialization to check the J2SE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
-	static final long serialVersionUID = -8007156725367842053L;
+    static final long serialVersionUID = -8007156725367842053L;
 
     /**
-     * Constructs a <code>NameNotFoundException</code> instance 
-     * with all data initialized to null.
+     * Constructs a <code>NameNotFoundException</code> instance with all data
+     * initialized to null.
      */
     public NameNotFoundException() {
         super();
     }
 
     /**
-     * Constructs a <code>NameNotFoundException</code> instance
-     * with the specified message.
-     *  
-     * @param s The detail message for the exception. It may be null.
+     * Constructs a <code>NameNotFoundException</code> instance with the
+     * specified message.
+     * 
+     * @param s
+     *            The detail message for the exception. It may be null.
      */
     public NameNotFoundException(String s) {
         super(s);
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameParser.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameParser.java Sat Jun 23 13:53:42 2007
@@ -15,37 +15,29 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 /**
- * A <code>NameParser</code> is used to validate and decompose a name from a 
- * particular namespace. It is implemented by classes provided in spi
- * implementations. 
- * 
+ * A <code>NameParser</code> is used to validate and decompose a name from a
+ * particular namespace. It is implemented by classes provided in SPI
+ * implementations.
  */
 public interface NameParser {
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Takes a name in a <code>String s</code> and validates it according to 
-     * the rules for the namespace. (See <code>CompoundName</code> for the 
-     * guidelines on name format and system parameters which affect the 
-     * translation of a name.) The name is then decomposed into its elements 
-     * and returned as a <code>Name</code>. 
+     * Takes a name in a <code>String s</code> and validates it according to
+     * the rules for the namespace. (See <code>CompoundName</code> for the
+     * guidelines on name format and system parameters which affect the
+     * translation of a name.) The name is then decomposed into its elements and
+     * returned as a <code>Name</code>.
      * 
-     * @param s the name to be examined - cannot be null
-     * @return  a <code>Name</code> instance, cannot be null.
-     * @throws InvalidNameException when the supplied string violates format 
-     *          rules
+     * @param s
+     *            the name to be examined - cannot be null
+     * @return a <code>Name</code> instance, cannot be null.
+     * @throws InvalidNameException
+     *             when the supplied string violates format rules
      * @throws NamingException
      */
     public Name parse(String s) throws InvalidNameException, NamingException;
-}
-
 
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingEnumeration.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingEnumeration.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingEnumeration.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingEnumeration.java Sat Jun 23 13:53:42 2007
@@ -15,51 +15,45 @@
  * limitations under the License.
  */
 
-
 package javax.naming;
 
 import java.util.Enumeration;
 import javax.naming.NamingException;
 
 /**
- * A <code>NamingEnumeration</code> interface is an <code>Enumeration</code> 
- * which has been extended to support <code>NamingException</code>s. They can 
- * be thrown when getting the next element, checking if the Enumeration has 
- * more elements or on closing the <code>Enumeration</code>.
- * 
+ * A <code>NamingEnumeration</code> interface is an <code>Enumeration</code>
+ * which has been extended to support <code>NamingException</code>s. They can
+ * be thrown when getting the next element, checking if the Enumeration has more
+ * elements or on closing the <code>Enumeration</code>.
  */
 public interface NamingEnumeration<T> extends Enumeration<T> {
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     /**
      * Get the next element.
-     *
-     * @return  the next element - can be null.
-     * @exception NamingException if a naming error occurs
-     * @exception java.util.NoSuchElementException when no more elements exist.
+     * 
+     * @return the next element - can be null.
+     * @exception NamingException
+     *                if a naming error occurs
+     * @exception java.util.NoSuchElementException
+     *                when no more elements exist.
      */
     public T next() throws NamingException;
 
     /**
      * Check for more elements.
-     *
-     * @return  if more elements exist return true else return false.
-     * @exception NamingException if a naming error occurs
+     * 
+     * @return if more elements exist return true else return false.
+     * @exception NamingException
+     *                if a naming error occurs
      */
     public boolean hasMore() throws NamingException;
 
     /**
      * Close the enumeration.
      * 
-     * @exception NamingException if a naming error occurs
+     * @exception NamingException
+     *                if a naming error occurs
      */
     public void close() throws NamingException;
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingException.java?view=diff&rev=550106&r1=550105&r2=550106
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NamingException.java Sat Jun 23 13:53:42 2007
@@ -42,20 +42,19 @@
  * It can also refer to the object that is associated with the resolved name.
  * </p>
  * <p>
- * Additionally it can refer to another exception, which may be the root cause of
- * this exception.
+ * Additionally it can refer to another exception, which may be the root cause
+ * of this exception.
  * </p>
  * <p>
  * Multithreaded access to a <code>NamingException</code> instance is only
  * safe when client code locks the object first.
  * </p>
- * 
  */
 public class NamingException extends Exception {
 
     /*
-     * This constant is used during deserialization to check the JSE version
-     * which created the serialized object.
+     * This constant is used during deserialization to check the version which
+     * created the serialized object.
      */
     private static final long serialVersionUID = -1299181962103167177L;
 
@@ -299,19 +298,23 @@
         return this.toStringImpl(false);
     }
 
+    @SuppressWarnings("nls")
     private String toStringImpl(boolean flag) {
         StringBuffer sb = new StringBuffer();
         sb.append(super.toString());
         if (null != rootException) {
-            sb.append(" [Root exception is ").append(rootException.toString()).append( //$NON-NLS-1$
-                            "]"); //$NON-NLS-1$
+            sb.append(" [Root exception is ").append(rootException.toString())
+                    .append("]");
         }
         if (null != remainingName) {
-            sb.append("; Remaining name: '").append(remainingName.toString()).append("'"); //$NON-NLS-1$//$NON-NLS-2$
+            sb.append("; Remaining name: '").append(remainingName.toString())
+                    .append("'");
         }
         if (flag && null != resolvedObj) {
-            sb.append("; Resolved object: '").append(resolvedObj.toString()).append("'"); //$NON-NLS-1$ //$NON-NLS-2$
+            sb.append("; Resolved object: '").append(resolvedObj.toString())
+                    .append("'");
         }
         return sb.toString();
     }
+
 }