464727 - Update Javadoc for Java 8 DocLint

+ Fixing javadoc in jetty-jndi
This commit is contained in:
Joakim Erdfelt 2015-04-22 09:00:16 -07:00
parent f126d02944
commit eb7de5eaee
8 changed files with 55 additions and 95 deletions

View File

@ -25,14 +25,8 @@ import javax.naming.Binding;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
/** BindingEnumeration
* <p>Implementation of NamingEnumeration
*
* <p><h4>Notes</h4>
* <p>Used to return results of Context.listBindings();
*
* <p><h4>Usage</h4>
*
/**
* BindingEnumeration
*/
public class BindingEnumeration implements NamingEnumeration<Binding>
{

View File

@ -37,30 +37,25 @@ import org.eclipse.jetty.util.log.Logger;
/**
* ContextFactory.java
*
* ContextFactory
* <p>
* This is an object factory that produces a jndi naming
* context based on a classloader.
*
* It is used for the java:comp context.
*
* This object factory is bound at java:comp. When a
* lookup arrives for java:comp, this object factory
* is invoked and will return a context specific to
* the caller's environment (so producing the java:comp/env
* specific to a webapp).
*
* The context selected is based on classloaders. First
* we try looking at the thread context classloader if it is set, and walk its
* hierarchy, creating a context if none is found. If the thread context classloader
* is not set, then we use the classloader associated with the current Context.
*
* If there is no current context, or no classloader, we return null.
*
* Created: Fri Jun 27 09:26:40 2003
*
*
*
* <p>
* It is used for the <code>java:comp</code> context.
* <p>
* This object factory is bound at <code>java:comp</code>. When a
* lookup arrives for java:comp, this object factory
* is invoked and will return a context specific to
* the caller's environment (so producing the <code>java:comp/env</code>
* specific to a webapp).
* <p>
* The context selected is based on classloaders. First
* we try looking at the thread context classloader if it is set, and walk its
* hierarchy, creating a context if none is found. If the thread context classloader
* is not set, then we use the classloader associated with the current Context.
* <p>
* If there is no current context, or no classloader, we return null.
*/
public class ContextFactory implements ObjectFactory
{
@ -87,15 +82,15 @@ public class ContextFactory implements ObjectFactory
/**
* Find or create a context which pertains to a classloader.
*
* <p>
* If the thread context classloader is set, we try to find an already-created naming context
* for it. If one does not exist, we walk its classloader hierarchy until one is found, or we
* run out of parent classloaders. In the latter case, we will create a new naming context associated
* with the original thread context classloader.
*
* <p>
* If the thread context classloader is not set, we obtain the classloader from the current
* jetty Context, and look for an already-created naming context.
*
* <p>
* If there is no current jetty Context, or it has no associated classloader, we
* return null.
* @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
@ -177,12 +172,13 @@ public class ContextFactory implements ObjectFactory
/**
* Create a new NamingContext.
* @param obj
* @param loader
* @param env
* @param name
* @param parentCtx
* @throws Exception
* @param obj the object to create
* @param loader the classloader for the naming context
* @param env the jndi env for the entry
* @param name the name of the entry
* @param parentCtx the parent context of the entry
* @return the newly created naming context
* @throws Exception if unable to create a new naming context
*/
public NamingContext newNamingContext(Object obj, ClassLoader loader, Hashtable env, Name name, Context parentCtx)
throws Exception
@ -201,7 +197,8 @@ public class ContextFactory implements ObjectFactory
/**
* Find the naming Context for the given classloader
* @param loader
* @param loader the classloader for the context
* @return the context for the classloader
*/
public Context getContextForClassLoader(ClassLoader loader)
{

View File

@ -25,14 +25,8 @@ import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
/** NameEnumeration
* <p>Implementation of NamingEnumeration interface.
*
* <p><h4>Notes</h4>
* <p>Used for returning results of Context.list();
*
* <p><h4>Usage</h4>
*
/**
* NameEnumeration
*/
public class NameEnumeration implements NamingEnumeration<NameClassPair>
{

View File

@ -18,7 +18,6 @@
package org.eclipse.jetty.jndi;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@ -48,13 +47,13 @@ import javax.naming.spi.NamingManager;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.log.Logger;
/*------------------------------------------------*/
/** NamingContext
* <p>Implementation of Context interface.
*
* <p><h4>Notes</h4>
* <p>All Names are expected to be Compound, not Composite.
/**
* NamingContext
* <p>
* Implementation of Context interface.
* <p>
* <b>Notes:</b>
* All Names are expected to be Compound, not Composite.
*/
@SuppressWarnings("unchecked")
public class NamingContext implements Context, Cloneable, Dumpable
@ -178,11 +177,6 @@ public class NamingContext implements Context, Cloneable, Dumpable
}
/*------------------------------------------------*/
/**
* Setter for _parser
*
*
*/
public void setNameParser (NameParser parser)
{
_parser = parser;
@ -1261,6 +1255,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
*
* @param name a <code>Name</code> value
* @param obj an <code>Object</code> value
* @throws NameAlreadyBoundException if name already bound
*/
public void addBinding (Name name, Object obj) throws NameAlreadyBoundException
{
@ -1337,7 +1332,7 @@ public class NamingContext implements Context, Cloneable, Dumpable
/*------------------------------------------------*/
/**
* Remove leading or trailing empty components from
* name. Eg "/comp/env/" -> "comp/env"
* name. Eg "/comp/env/" -&gt; "comp/env"
*
* @param name the name to normalize
* @return normalized name

View File

@ -33,13 +33,7 @@ import org.eclipse.jetty.util.log.Logger;
/**
* Util.java
*
*
* Created: Tue Jul 1 18:26:17 2003
*
*
* @version 1.0
* Naming Utility Methods
*/
public class NamingUtil
{
@ -53,6 +47,7 @@ public class NamingUtil
* @param ctx the context into which to bind
* @param nameStr the name relative to context to bind
* @param obj the object to be bound
* @return the bound context
* @exception NamingException if an error occurs
*/
public static Context bind (Context ctx, String nameStr, Object obj)
@ -112,7 +107,7 @@ public class NamingUtil
* @param ctx the context containing the name for which to list the bindings
* @param name the name in the context to list
* @return map: key is fully qualified name, value is the bound object
* @throws NamingException
* @throws NamingException if unable to flatten bindings
*/
public static Map flattenBindings (Context ctx, String name)
throws NamingException

View File

@ -92,17 +92,8 @@ public class MailSessionReference extends Reference implements ObjectFactory
{
this.password = password;
}
};
/**
*
*/
public MailSessionReference()
{
super ("javax.mail.Session", MailSessionReference.class.getName(), null);
@ -117,7 +108,7 @@ public class MailSessionReference extends Reference implements ObjectFactory
* @param arg2 not used
* @param arg3 not used
* @return the object found
* @throws Exception
* @throws Exception if unable to get object instance
*/
public Object getObjectInstance(Object ref, Name arg1, Context arg2, Hashtable arg3) throws Exception
{

View File

@ -37,14 +37,12 @@ import org.eclipse.jetty.util.log.Logger;
/** javaRootURLContext
* <p>This is the root of the java: url namespace
*
* <p><h4>Notes</h4>
* <p>Thanks to Rickard Oberg for the idea of binding an ObjectFactory at "comp".
*
* <p><h4>Usage</h4>
* <pre>
/**
* javaRootURLContext
* <p>
* This is the root of the <code>java:</code> url namespace
* <p>
* (Thanks to Rickard Oberg for the idea of binding an ObjectFactory at "comp")
*/
public class javaRootURLContext implements Context
{

View File

@ -29,14 +29,10 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/** javaURLContextFactory
* <p>This is the URL context factory for the java: URL.
*
* <p><h4>Notes</h4>
/**
* javaURLContextFactory
* <p>
*
* <p><h4>Usage</h4>
* <pre>
* This is the URL context factory for the <code>java:</code> URL.
*/
public class javaURLContextFactory implements ObjectFactory
{