From 975ba338ebdd4142f12f5736eec591c334a4693f Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 12 Jan 2011 23:49:18 +0000 Subject: [PATCH] Fix Javadoc warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1058357 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/Container.java | 2 +- java/org/apache/catalina/Host.java | 12 ++++++------ java/org/apache/catalina/Server.java | 4 ++-- java/org/apache/catalina/Service.java | 4 ++-- .../apache/catalina/authenticator/AuthenticatorBase.java | 6 +++--- java/org/apache/catalina/filters/RequestFilter.java | 2 +- java/org/apache/catalina/session/ManagerBase.java | 6 +++--- java/org/apache/catalina/valves/RequestFilterValve.java | 2 +- java/org/apache/tomcat/util/net/AbstractEndpoint.java | 14 ++++++++------ java/org/apache/tomcat/util/threads/CounterLatch.java | 13 ++++++++++--- .../tomcat/util/threads/DedicatedThreadExecutor.java | 4 ++-- java/org/apache/tomcat/util/threads/ResizableExecutor.java | 12 ++++++++---- webapps/docs/changelog.xml | 7 +++++++ 13 files changed, 54 insertions(+), 34 deletions(-) diff --git a/java/org/apache/catalina/Container.java b/java/org/apache/catalina/Container.java index 37102db74..73b265e14 100644 --- a/java/org/apache/catalina/Container.java +++ b/java/org/apache/catalina/Container.java @@ -283,7 +283,7 @@ public interface Container extends Lifecycle { /** * Return the parent class loader for this component. If not set, return - * {@link Container#getParent()#getParentClassLoader()}. If no parent has + * {@link #getParent()} {@link #getParentClassLoader()}. If no parent has * been set, return the system class loader. */ public ClassLoader getParentClassLoader(); diff --git a/java/org/apache/catalina/Host.java b/java/org/apache/catalina/Host.java index e827f20d5..e410762e3 100644 --- a/java/org/apache/catalina/Host.java +++ b/java/org/apache/catalina/Host.java @@ -149,24 +149,24 @@ public interface Host extends Container { /** * Return the regular expression that defines the files and directories in - * the host's {@link #appBase} that will be ignored by the automatic - * deployment process. + * the host's appBase that will be ignored by the automatic deployment + * process. */ public String getDeployIgnore(); /** * Return the compiled regular expression that defines the files and - * directories in the host's {@link #appBase} that will be ignored by the - * automatic deployment process. + * directories in the host's appBase that will be ignored by the automatic + * deployment process. */ public Pattern getDeployIgnorePattern(); /** * Set the regular expression that defines the files and directories in - * the host's {@link #appBase} that will be ignored by the automatic - * deployment process. + * the host's appBase that will be ignored by the automatic deployment + * process. */ public void setDeployIgnore(String deployIgnore); diff --git a/java/org/apache/catalina/Server.java b/java/org/apache/catalina/Server.java index c6f8d2bf3..5e36f05d9 100644 --- a/java/org/apache/catalina/Server.java +++ b/java/org/apache/catalina/Server.java @@ -119,8 +119,8 @@ public interface Server extends Lifecycle { /** * Return the parent class loader for this component. If not set, return - * {@link Server#getCatalina()#getParentClassLoader(). If no catalina has - * been set, return the system class loader. + * {@link #getCatalina()} {@link Catalina#getParentClassLoader()}. If + * catalina has not been set, return the system class loader. */ public ClassLoader getParentClassLoader(); diff --git a/java/org/apache/catalina/Service.java b/java/org/apache/catalina/Service.java index 2ce5036e3..7b9f33f14 100644 --- a/java/org/apache/catalina/Service.java +++ b/java/org/apache/catalina/Service.java @@ -86,8 +86,8 @@ public interface Service extends Lifecycle { /** * Return the parent class loader for this component. If not set, return - * {@link Service#getServer()#getParentClassLoader(). If no server has - * been set, return the system class loader. + * {@link #getServer()} {@link Server#getParentClassLoader()}. If no server + * has been set, return the system class loader. */ public ClassLoader getParentClassLoader(); diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java b/java/org/apache/catalina/authenticator/AuthenticatorBase.java index 1decab581..2983fcacd 100644 --- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java +++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java @@ -169,14 +169,14 @@ public abstract class AuthenticatorBase extends ValveBase * The Java class name of the secure random number generator class to be * used when generating SSO session identifiers. The random number generator * class must be self-seeding and have a zero-argument constructor. If not - * specified, an instance of {@link java.secure.SecureRandom} will be + * specified, an instance of {@link java.security.SecureRandom} will be * generated. */ protected String secureRandomClass = null; /** * The name of the algorithm to use to create instances of - * {@link java.secure.SecureRandom} which are used to generate SSO session + * {@link java.security.SecureRandom} which are used to generate SSO session * IDs. If no algorithm is specified, SHA1PRNG is used. To use the platform * default (which may be SHA1PRNG), specify the empty string. If an invalid * algorithm and/or provider is specified the SecureRandom instances will be @@ -187,7 +187,7 @@ public abstract class AuthenticatorBase extends ValveBase /** * The name of the provider to use to create instances of - * {@link java.secure.SecureRandom} which are used to generate session SSO + * {@link java.security.SecureRandom} which are used to generate session SSO * IDs. If no algorithm is specified the of SHA1PRNG default is used. If an * invalid algorithm and/or provider is specified the SecureRandom instances * will be created using the defaults. If that fails, the SecureRandom diff --git a/java/org/apache/catalina/filters/RequestFilter.java b/java/org/apache/catalina/filters/RequestFilter.java index 02127addc..a471bf281 100644 --- a/java/org/apache/catalina/filters/RequestFilter.java +++ b/java/org/apache/catalina/filters/RequestFilter.java @@ -126,7 +126,7 @@ public abstract class RequestFilter * Set the regular expression used to test for denied requests for this * Filter, if any. * - * @param allow The new deny expression + * @param deny The new deny expression */ public void setDeny(String deny) { if (deny == null || deny.length() == 0) { diff --git a/java/org/apache/catalina/session/ManagerBase.java b/java/org/apache/catalina/session/ManagerBase.java index 800f2171a..2a193da43 100644 --- a/java/org/apache/catalina/session/ManagerBase.java +++ b/java/org/apache/catalina/session/ManagerBase.java @@ -108,14 +108,14 @@ public abstract class ManagerBase extends LifecycleMBeanBase * The Java class name of the secure random number generator class to be * used when generating session identifiers. The random number generator * class must be self-seeding and have a zero-argument constructor. If not - * specified, an instance of {@link java.secure.SecureRandom} will be + * specified, an instance of {@link java.security.SecureRandom} will be * generated. */ protected String secureRandomClass = null; /** * The name of the algorithm to use to create instances of - * {@link java.secure.SecureRandom} which are used to generate session IDs. + * {@link java.security.SecureRandom} which are used to generate session IDs. * If no algorithm is specified, SHA1PRNG is used. To use the platform * default (which may be SHA1PRNG), specify the empty string. If an invalid * algorithm and/or provider is specified the SecureRandom instances will be @@ -126,7 +126,7 @@ public abstract class ManagerBase extends LifecycleMBeanBase /** * The name of the provider to use to create instances of - * {@link java.secure.SecureRandom} which are used to generate session IDs. + * {@link java.security.SecureRandom} which are used to generate session IDs. * If no algorithm is specified the of SHA1PRNG default is used. If an * invalid algorithm and/or provider is specified the SecureRandom instances * will be created using the defaults. If that fails, the SecureRandom diff --git a/java/org/apache/catalina/valves/RequestFilterValve.java b/java/org/apache/catalina/valves/RequestFilterValve.java index 27d8fe485..085eabb82 100644 --- a/java/org/apache/catalina/valves/RequestFilterValve.java +++ b/java/org/apache/catalina/valves/RequestFilterValve.java @@ -139,7 +139,7 @@ public abstract class RequestFilterValve * Set the regular expression used to test for denied requests for this * Valve, if any. * - * @param allow The new deny expression + * @param deny The new deny expression */ public void setDeny(String deny) { if (deny == null || deny.length() == 0) { diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index 8e80c3b05..98b76badd 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -312,17 +312,19 @@ public abstract class AbstractEndpoint { /** * Attributes provide a way for configuration to be passed to sub-components - * without the {@link ProtocolHandler} being aware of the properties - * available on those sub-components. One example of such a sub-component is - * the {@link org.apache.tomcat.util.net.ServerSocketFactory}. + * without the {@link org.apache.coyote.ProtocolHandler} being aware of the + * properties available on those sub-components. One example of such a + * sub-component is the + * {@link org.apache.tomcat.util.net.ServerSocketFactory}. */ protected HashMap attributes = new HashMap(); /** * Generic property setter called when a property for which a specific - * setter already exists within the {@link ProtocolHandler} needs to be - * made available to sub-components. The specific setter will call this - * method to populate the attributes. + * setter already exists within the + * {@link org.apache.coyote.ProtocolHandler} needs to be made available to + * sub-components. The specific setter will call this method to populate the + * attributes. */ public void setAttribute(String name, Object value) { if (getLog().isTraceEnabled()) { diff --git a/java/org/apache/tomcat/util/threads/CounterLatch.java b/java/org/apache/tomcat/util/threads/CounterLatch.java index 1e5f04f98..2b3718c9d 100644 --- a/java/org/apache/tomcat/util/threads/CounterLatch.java +++ b/java/org/apache/tomcat/util/threads/CounterLatch.java @@ -35,13 +35,17 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer; public class CounterLatch { private class Sync extends AbstractQueuedSynchronizer { + private static final long serialVersionUID = 1L; + public Sync() { } + @Override protected int tryAcquireShared(int arg) { return ((!released) && count.get() == signal) ? -1 : 1; } + @Override protected boolean tryReleaseShared(int arg) { return true; } @@ -123,7 +127,8 @@ public class CounterLatch { * If the operation is successful and {@code expect==waitValue && expect!=update} waiting threads will be released. * @param expect - the expected counter value * @param update - the new counter value - * @return + * @return true if successful, false if the + * current value wasn't as expected */ public boolean compareAndSet(long expect, long update) { boolean result = count.compareAndSet(expect, update); @@ -152,7 +157,9 @@ public class CounterLatch { /** * releases all waiting threads. This operation is permanent, and no threads will block, * even if the counter hits the {@code waitValue} until {@link #reset(long)} has been called. - * @return + * @return true if this release of shared mode may permit a + * waiting acquire (shared or exclusive) to succeed; and + * false otherwise */ public boolean releaseAll() { released = true; @@ -162,7 +169,7 @@ public class CounterLatch { /** * Resets the latch and initializes the counter with the new value. * @param value the new counter value - * @see {@link #releaseAll()} + * @see #releaseAll() */ public void reset(long value) { this.count.set(value); diff --git a/java/org/apache/tomcat/util/threads/DedicatedThreadExecutor.java b/java/org/apache/tomcat/util/threads/DedicatedThreadExecutor.java index fbec1ea43..574140ea3 100644 --- a/java/org/apache/tomcat/util/threads/DedicatedThreadExecutor.java +++ b/java/org/apache/tomcat/util/threads/DedicatedThreadExecutor.java @@ -44,7 +44,7 @@ public class DedicatedThreadExecutor { * @param * the type of the returned value * @param callable - * @return + * @return the completed result */ public V execute(final Callable callable) { final Future futureTask = executorService.submit(callable); @@ -99,7 +99,7 @@ public class DedicatedThreadExecutor { * * @param * @param callable - * @return + * @return the completed result */ public static V executeInOwnThread( final Callable callable) { diff --git a/java/org/apache/tomcat/util/threads/ResizableExecutor.java b/java/org/apache/tomcat/util/threads/ResizableExecutor.java index 2a411afb4..0e8f0d294 100644 --- a/java/org/apache/tomcat/util/threads/ResizableExecutor.java +++ b/java/org/apache/tomcat/util/threads/ResizableExecutor.java @@ -19,17 +19,21 @@ package org.apache.tomcat.util.threads; import java.util.concurrent.Executor; public interface ResizableExecutor extends Executor { + /** - * {@link java.util.concurrent.ThreadPoolExecutor#getPoolSize()} - * @return {@link java.util.concurrent.ThreadPoolExecutor#getPoolSize()} + * Returns the current number of threads in the pool. + * + * @return the number of threads */ public int getPoolSize(); public int getMaxThreads(); /** - * {@link java.util.concurrent.ThreadPoolExecutor#getActiveCount()} - * @return {@link java.util.concurrent.ThreadPoolExecutor#getActiveCount()} + * Returns the approximate number of threads that are actively executing + * tasks. + * + * @return the number of threads */ public int getActiveCount(); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a442424e4..41dd77514 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -68,6 +68,13 @@ + + + + Correct a handful of Javadoc warnings. (markt) + + + -- 2.11.0